michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* michael@0: * methods for dealing with CSS properties and tables of the keyword michael@0: * values they accept michael@0: */ michael@0: michael@0: #include "mozilla/ArrayUtils.h" michael@0: michael@0: #include "nsCSSProps.h" michael@0: #include "nsCSSKeywords.h" michael@0: #include "nsLayoutUtils.h" michael@0: #include "nsStyleConsts.h" michael@0: #include "nsIWidget.h" michael@0: #include "nsThemeConstants.h" // For system widget appearance types michael@0: michael@0: #include "mozilla/LookAndFeel.h" // for system colors michael@0: michael@0: #include "nsString.h" michael@0: #include "nsStaticNameTable.h" michael@0: michael@0: #include "mozilla/Preferences.h" michael@0: michael@0: using namespace mozilla; michael@0: michael@0: typedef nsCSSProps::KTableValue KTableValue; michael@0: michael@0: // required to make the symbol external, so that TestCSSPropertyLookup.cpp can link with it michael@0: extern const char* const kCSSRawProperties[]; michael@0: michael@0: // define an array of all CSS properties michael@0: const char* const kCSSRawProperties[eCSSProperty_COUNT_with_aliases] = { michael@0: #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \ michael@0: stylestruct_, stylestructoffset_, animtype_) \ michael@0: #name_, michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP michael@0: #define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) #name_, michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_SHORTHAND michael@0: #define CSS_PROP_ALIAS(aliasname_, id_, method_, pref_) #aliasname_, michael@0: #include "nsCSSPropAliasList.h" michael@0: #undef CSS_PROP_ALIAS michael@0: }; michael@0: michael@0: using namespace mozilla; michael@0: michael@0: static int32_t gPropertyTableRefCount; michael@0: static nsStaticCaseInsensitiveNameTable* gPropertyTable; michael@0: static nsStaticCaseInsensitiveNameTable* gFontDescTable; michael@0: michael@0: /* static */ nsCSSProperty * michael@0: nsCSSProps::gShorthandsContainingTable[eCSSProperty_COUNT_no_shorthands]; michael@0: /* static */ nsCSSProperty* nsCSSProps::gShorthandsContainingPool = nullptr; michael@0: michael@0: static const char* const kCSSRawFontDescs[] = { michael@0: #define CSS_FONT_DESC(name_, method_) #name_, michael@0: #include "nsCSSFontDescList.h" michael@0: #undef CSS_FONT_DESC michael@0: }; michael@0: michael@0: struct PropertyAndCount { michael@0: nsCSSProperty property; michael@0: uint32_t count; michael@0: }; michael@0: michael@0: static int michael@0: SortPropertyAndCount(const void* s1, const void* s2, void *closure) michael@0: { michael@0: const PropertyAndCount *pc1 = static_cast(s1); michael@0: const PropertyAndCount *pc2 = static_cast(s2); michael@0: // Primary sort by count (lowest to highest) michael@0: if (pc1->count != pc2->count) michael@0: return pc1->count - pc2->count; michael@0: // Secondary sort by property index (highest to lowest) michael@0: return pc2->property - pc1->property; michael@0: } michael@0: michael@0: // We need eCSSAliasCount so we can make gAliases nonzero size when there michael@0: // are no aliases. michael@0: enum { michael@0: eCSSAliasCount = eCSSProperty_COUNT_with_aliases - eCSSProperty_COUNT michael@0: }; michael@0: michael@0: // The names are in kCSSRawProperties. michael@0: static nsCSSProperty gAliases[eCSSAliasCount != 0 ? eCSSAliasCount : 1] = { michael@0: #define CSS_PROP_ALIAS(aliasname_, propid_, aliasmethod_, pref_) \ michael@0: eCSSProperty_##propid_ , michael@0: #include "nsCSSPropAliasList.h" michael@0: #undef CSS_PROP_ALIAS michael@0: }; michael@0: michael@0: nsStaticCaseInsensitiveNameTable* michael@0: CreateStaticTable(const char* const aRawTable[], int32_t aSize) michael@0: { michael@0: auto table = new nsStaticCaseInsensitiveNameTable(); michael@0: if (table) { michael@0: #ifdef DEBUG michael@0: // let's verify the table... michael@0: for (int32_t index = 0; index < aSize; ++index) { michael@0: nsAutoCString temp1(aRawTable[index]); michael@0: nsAutoCString temp2(aRawTable[index]); michael@0: ToLowerCase(temp1); michael@0: NS_ABORT_IF_FALSE(temp1.Equals(temp2), michael@0: "upper case char in case insensitive name table"); michael@0: NS_ABORT_IF_FALSE(-1 == temp1.FindChar('_'), michael@0: "underscore char in case insensitive name table"); michael@0: } michael@0: #endif michael@0: table->Init(aRawTable, aSize); michael@0: } michael@0: return table; michael@0: } michael@0: michael@0: void michael@0: nsCSSProps::AddRefTable(void) michael@0: { michael@0: if (0 == gPropertyTableRefCount++) { michael@0: NS_ABORT_IF_FALSE(!gPropertyTable, "pre existing array!"); michael@0: NS_ABORT_IF_FALSE(!gFontDescTable, "pre existing array!"); michael@0: michael@0: gPropertyTable = CreateStaticTable( michael@0: kCSSRawProperties, eCSSProperty_COUNT_with_aliases); michael@0: gFontDescTable = CreateStaticTable(kCSSRawFontDescs, eCSSFontDesc_COUNT); michael@0: michael@0: BuildShorthandsContainingTable(); michael@0: michael@0: static bool prefObserversInited = false; michael@0: if (!prefObserversInited) { michael@0: prefObserversInited = true; michael@0: michael@0: #define OBSERVE_PROP(pref_, id_) \ michael@0: if (pref_[0]) { \ michael@0: Preferences::AddBoolVarCache(&gPropertyEnabled[id_], \ michael@0: pref_); \ michael@0: } michael@0: michael@0: #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \ michael@0: kwtable_, stylestruct_, stylestructoffset_, animtype_) \ michael@0: OBSERVE_PROP(pref_, eCSSProperty_##id_) michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP michael@0: michael@0: #define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \ michael@0: OBSERVE_PROP(pref_, eCSSProperty_##id_) michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_SHORTHAND michael@0: michael@0: #define CSS_PROP_ALIAS(aliasname_, propid_, aliasmethod_, pref_) \ michael@0: OBSERVE_PROP(pref_, eCSSPropertyAlias_##aliasmethod_) michael@0: #include "nsCSSPropAliasList.h" michael@0: #undef CSS_PROP_ALIAS michael@0: michael@0: #undef OBSERVE_PROP michael@0: } michael@0: } michael@0: } michael@0: michael@0: #undef DEBUG_SHORTHANDS_CONTAINING michael@0: michael@0: bool michael@0: nsCSSProps::BuildShorthandsContainingTable() michael@0: { michael@0: uint32_t occurrenceCounts[eCSSProperty_COUNT_no_shorthands]; michael@0: memset(occurrenceCounts, 0, sizeof(occurrenceCounts)); michael@0: PropertyAndCount subpropCounts[eCSSProperty_COUNT - michael@0: eCSSProperty_COUNT_no_shorthands]; michael@0: for (nsCSSProperty shorthand = eCSSProperty_COUNT_no_shorthands; michael@0: shorthand < eCSSProperty_COUNT; michael@0: shorthand = nsCSSProperty(shorthand + 1)) { michael@0: #ifdef DEBUG_SHORTHANDS_CONTAINING michael@0: printf("Considering shorthand property '%s'.\n", michael@0: nsCSSProps::GetStringValue(shorthand).get()); michael@0: #endif michael@0: PropertyAndCount &subpropCountsEntry = michael@0: subpropCounts[shorthand - eCSSProperty_COUNT_no_shorthands]; michael@0: subpropCountsEntry.property = shorthand; michael@0: subpropCountsEntry.count = 0; michael@0: if (nsCSSProps::PropHasFlags(shorthand, CSS_PROPERTY_IS_ALIAS)) { michael@0: // Don't put shorthands that are acting as aliases in the michael@0: // shorthands-containing lists. michael@0: continue; michael@0: } michael@0: for (const nsCSSProperty* subprops = SubpropertyEntryFor(shorthand); michael@0: *subprops != eCSSProperty_UNKNOWN; michael@0: ++subprops) { michael@0: NS_ABORT_IF_FALSE(0 <= *subprops && michael@0: *subprops < eCSSProperty_COUNT_no_shorthands, michael@0: "subproperty must be a longhand"); michael@0: ++occurrenceCounts[*subprops]; michael@0: ++subpropCountsEntry.count; michael@0: } michael@0: } michael@0: michael@0: uint32_t poolEntries = 0; michael@0: for (nsCSSProperty longhand = nsCSSProperty(0); michael@0: longhand < eCSSProperty_COUNT_no_shorthands; michael@0: longhand = nsCSSProperty(longhand + 1)) { michael@0: uint32_t count = occurrenceCounts[longhand]; michael@0: if (count > 0) michael@0: // leave room for terminator michael@0: poolEntries += count + 1; michael@0: } michael@0: michael@0: gShorthandsContainingPool = new nsCSSProperty[poolEntries]; michael@0: if (!gShorthandsContainingPool) michael@0: return false; michael@0: michael@0: // Initialize all entries to point to their null-terminator. michael@0: { michael@0: nsCSSProperty *poolCursor = gShorthandsContainingPool - 1; michael@0: nsCSSProperty *lastTerminator = michael@0: gShorthandsContainingPool + poolEntries - 1; michael@0: for (nsCSSProperty longhand = nsCSSProperty(0); michael@0: longhand < eCSSProperty_COUNT_no_shorthands; michael@0: longhand = nsCSSProperty(longhand + 1)) { michael@0: uint32_t count = occurrenceCounts[longhand]; michael@0: if (count > 0) { michael@0: poolCursor += count + 1; michael@0: gShorthandsContainingTable[longhand] = poolCursor; michael@0: *poolCursor = eCSSProperty_UNKNOWN; michael@0: } else { michael@0: gShorthandsContainingTable[longhand] = lastTerminator; michael@0: } michael@0: } michael@0: NS_ABORT_IF_FALSE(poolCursor == lastTerminator, "miscalculation"); michael@0: } michael@0: michael@0: // Sort with lowest count at the start and highest at the end, and michael@0: // within counts sort in reverse property index order. michael@0: NS_QuickSort(&subpropCounts, ArrayLength(subpropCounts), michael@0: sizeof(subpropCounts[0]), SortPropertyAndCount, nullptr); michael@0: michael@0: // Fill in all the entries in gShorthandsContainingTable michael@0: for (const PropertyAndCount *shorthandAndCount = subpropCounts, michael@0: *shorthandAndCountEnd = ArrayEnd(subpropCounts); michael@0: shorthandAndCount < shorthandAndCountEnd; michael@0: ++shorthandAndCount) { michael@0: #ifdef DEBUG_SHORTHANDS_CONTAINING michael@0: printf("Entering %u subprops for '%s'.\n", michael@0: shorthandAndCount->count, michael@0: nsCSSProps::GetStringValue(shorthandAndCount->property).get()); michael@0: #endif michael@0: if (nsCSSProps::PropHasFlags(shorthandAndCount->property, michael@0: CSS_PROPERTY_IS_ALIAS)) { michael@0: // Don't put shorthands that are acting as aliases in the michael@0: // shorthands-containing lists. michael@0: continue; michael@0: } michael@0: for (const nsCSSProperty* subprops = michael@0: SubpropertyEntryFor(shorthandAndCount->property); michael@0: *subprops != eCSSProperty_UNKNOWN; michael@0: ++subprops) { michael@0: *(--gShorthandsContainingTable[*subprops]) = shorthandAndCount->property; michael@0: } michael@0: } michael@0: michael@0: #ifdef DEBUG_SHORTHANDS_CONTAINING michael@0: for (nsCSSProperty longhand = nsCSSProperty(0); michael@0: longhand < eCSSProperty_COUNT_no_shorthands; michael@0: longhand = nsCSSProperty(longhand + 1)) { michael@0: printf("Property %s is in %d shorthands.\n", michael@0: nsCSSProps::GetStringValue(longhand).get(), michael@0: occurrenceCounts[longhand]); michael@0: for (const nsCSSProperty *shorthands = ShorthandsContaining(longhand); michael@0: *shorthands != eCSSProperty_UNKNOWN; michael@0: ++shorthands) { michael@0: printf(" %s\n", nsCSSProps::GetStringValue(*shorthands).get()); michael@0: } michael@0: } michael@0: #endif michael@0: michael@0: #ifdef DEBUG michael@0: // Verify that all values that should be are present. michael@0: for (nsCSSProperty shorthand = eCSSProperty_COUNT_no_shorthands; michael@0: shorthand < eCSSProperty_COUNT; michael@0: shorthand = nsCSSProperty(shorthand + 1)) { michael@0: if (nsCSSProps::PropHasFlags(shorthand, CSS_PROPERTY_IS_ALIAS)) { michael@0: // Don't put shorthands that are acting as aliases in the michael@0: // shorthands-containing lists. michael@0: continue; michael@0: } michael@0: for (const nsCSSProperty* subprops = SubpropertyEntryFor(shorthand); michael@0: *subprops != eCSSProperty_UNKNOWN; michael@0: ++subprops) { michael@0: uint32_t count = 0; michael@0: for (const nsCSSProperty *shcont = ShorthandsContaining(*subprops); michael@0: *shcont != eCSSProperty_UNKNOWN; michael@0: ++shcont) { michael@0: if (*shcont == shorthand) michael@0: ++count; michael@0: } michael@0: NS_ABORT_IF_FALSE(count == 1, michael@0: "subproperty of shorthand should have shorthand" michael@0: " in its ShorthandsContaining() table"); michael@0: } michael@0: } michael@0: michael@0: // Verify that there are no extra values michael@0: for (nsCSSProperty longhand = nsCSSProperty(0); michael@0: longhand < eCSSProperty_COUNT_no_shorthands; michael@0: longhand = nsCSSProperty(longhand + 1)) { michael@0: for (const nsCSSProperty *shorthands = ShorthandsContaining(longhand); michael@0: *shorthands != eCSSProperty_UNKNOWN; michael@0: ++shorthands) { michael@0: uint32_t count = 0; michael@0: for (const nsCSSProperty* subprops = SubpropertyEntryFor(*shorthands); michael@0: *subprops != eCSSProperty_UNKNOWN; michael@0: ++subprops) { michael@0: if (*subprops == longhand) michael@0: ++count; michael@0: } michael@0: NS_ABORT_IF_FALSE(count == 1, michael@0: "longhand should be in subproperty table of " michael@0: "property in its ShorthandsContaining() table"); michael@0: } michael@0: } michael@0: #endif michael@0: michael@0: return true; michael@0: } michael@0: michael@0: void michael@0: nsCSSProps::ReleaseTable(void) michael@0: { michael@0: if (0 == --gPropertyTableRefCount) { michael@0: delete gPropertyTable; michael@0: gPropertyTable = nullptr; michael@0: michael@0: delete gFontDescTable; michael@0: gFontDescTable = nullptr; michael@0: michael@0: delete [] gShorthandsContainingPool; michael@0: gShorthandsContainingPool = nullptr; michael@0: } michael@0: } michael@0: michael@0: /* static */ bool michael@0: nsCSSProps::IsInherited(nsCSSProperty aProperty) michael@0: { michael@0: MOZ_ASSERT(!IsShorthand(aProperty)); michael@0: michael@0: nsStyleStructID sid = kSIDTable[aProperty]; michael@0: return nsCachedStyleData::IsInherited(sid); michael@0: } michael@0: michael@0: /* static */ bool michael@0: nsCSSProps::IsCustomPropertyName(const nsACString& aProperty) michael@0: { michael@0: // Custom properties don't need to have a character after the "--" prefix. michael@0: return aProperty.Length() >= CSS_CUSTOM_NAME_PREFIX_LENGTH && michael@0: StringBeginsWith(aProperty, NS_LITERAL_CSTRING("--")); michael@0: } michael@0: michael@0: /* static */ bool michael@0: nsCSSProps::IsCustomPropertyName(const nsAString& aProperty) michael@0: { michael@0: return aProperty.Length() >= CSS_CUSTOM_NAME_PREFIX_LENGTH && michael@0: StringBeginsWith(aProperty, NS_LITERAL_STRING("--")); michael@0: } michael@0: michael@0: nsCSSProperty michael@0: nsCSSProps::LookupProperty(const nsACString& aProperty, michael@0: EnabledState aEnabled) michael@0: { michael@0: NS_ABORT_IF_FALSE(gPropertyTable, "no lookup table, needs addref"); michael@0: michael@0: if (nsLayoutUtils::CSSVariablesEnabled() && michael@0: IsCustomPropertyName(aProperty)) { michael@0: return eCSSPropertyExtra_variable; michael@0: } michael@0: michael@0: nsCSSProperty res = nsCSSProperty(gPropertyTable->Lookup(aProperty)); michael@0: if (MOZ_LIKELY(res < eCSSProperty_COUNT)) { michael@0: if (res != eCSSProperty_UNKNOWN && !IsEnabled(res, aEnabled)) { michael@0: res = eCSSProperty_UNKNOWN; michael@0: } michael@0: return res; michael@0: } michael@0: MOZ_ASSERT(eCSSAliasCount != 0, michael@0: "'res' must be an alias at this point so we better have some!"); michael@0: // We intentionally don't support eEnabledInUASheets or eEnabledInChromeOrCertifiedApp michael@0: // for aliases yet because it's unlikely there will be a need for it. michael@0: if (IsEnabled(res) || aEnabled == eIgnoreEnabledState) { michael@0: res = gAliases[res - eCSSProperty_COUNT]; michael@0: NS_ABORT_IF_FALSE(0 <= res && res < eCSSProperty_COUNT, michael@0: "aliases must not point to other aliases"); michael@0: if (IsEnabled(res) || aEnabled == eIgnoreEnabledState) { michael@0: return res; michael@0: } michael@0: } michael@0: return eCSSProperty_UNKNOWN; michael@0: } michael@0: michael@0: nsCSSProperty michael@0: nsCSSProps::LookupProperty(const nsAString& aProperty, EnabledState aEnabled) michael@0: { michael@0: if (nsLayoutUtils::CSSVariablesEnabled() && michael@0: IsCustomPropertyName(aProperty)) { michael@0: return eCSSPropertyExtra_variable; michael@0: } michael@0: michael@0: // This is faster than converting and calling michael@0: // LookupProperty(nsACString&). The table will do its own michael@0: // converting and avoid a PromiseFlatCString() call. michael@0: NS_ABORT_IF_FALSE(gPropertyTable, "no lookup table, needs addref"); michael@0: nsCSSProperty res = nsCSSProperty(gPropertyTable->Lookup(aProperty)); michael@0: if (MOZ_LIKELY(res < eCSSProperty_COUNT)) { michael@0: if (res != eCSSProperty_UNKNOWN && !IsEnabled(res, aEnabled)) { michael@0: res = eCSSProperty_UNKNOWN; michael@0: } michael@0: return res; michael@0: } michael@0: MOZ_ASSERT(eCSSAliasCount != 0, michael@0: "'res' must be an alias at this point so we better have some!"); michael@0: // We intentionally don't support eEnabledInUASheets for aliases yet michael@0: // because it's unlikely there will be a need for it. michael@0: if (IsEnabled(res) || aEnabled == eIgnoreEnabledState) { michael@0: res = gAliases[res - eCSSProperty_COUNT]; michael@0: NS_ABORT_IF_FALSE(0 <= res && res < eCSSProperty_COUNT, michael@0: "aliases must not point to other aliases"); michael@0: if (IsEnabled(res) || aEnabled == eIgnoreEnabledState) { michael@0: return res; michael@0: } michael@0: } michael@0: return eCSSProperty_UNKNOWN; michael@0: } michael@0: michael@0: nsCSSFontDesc michael@0: nsCSSProps::LookupFontDesc(const nsACString& aFontDesc) michael@0: { michael@0: NS_ABORT_IF_FALSE(gFontDescTable, "no lookup table, needs addref"); michael@0: return nsCSSFontDesc(gFontDescTable->Lookup(aFontDesc)); michael@0: } michael@0: michael@0: nsCSSFontDesc michael@0: nsCSSProps::LookupFontDesc(const nsAString& aFontDesc) michael@0: { michael@0: NS_ABORT_IF_FALSE(gFontDescTable, "no lookup table, needs addref"); michael@0: nsCSSFontDesc which = nsCSSFontDesc(gFontDescTable->Lookup(aFontDesc)); michael@0: michael@0: // font-variant-alternates enabled ==> layout.css.font-features.enabled is true michael@0: bool fontFeaturesEnabled = michael@0: nsCSSProps::IsEnabled(eCSSProperty_font_variant_alternates); michael@0: michael@0: // check for unprefixed font-feature-settings/font-language-override michael@0: if (which == eCSSFontDesc_UNKNOWN && fontFeaturesEnabled) { michael@0: nsAutoString prefixedProp; michael@0: prefixedProp.AppendLiteral("-moz-"); michael@0: prefixedProp.Append(aFontDesc); michael@0: which = nsCSSFontDesc(gFontDescTable->Lookup(prefixedProp)); michael@0: } michael@0: return which; michael@0: } michael@0: michael@0: const nsAFlatCString& michael@0: nsCSSProps::GetStringValue(nsCSSProperty aProperty) michael@0: { michael@0: NS_ABORT_IF_FALSE(gPropertyTable, "no lookup table, needs addref"); michael@0: if (gPropertyTable) { michael@0: return gPropertyTable->GetStringValue(int32_t(aProperty)); michael@0: } else { michael@0: static nsDependentCString sNullStr(""); michael@0: return sNullStr; michael@0: } michael@0: } michael@0: michael@0: const nsAFlatCString& michael@0: nsCSSProps::GetStringValue(nsCSSFontDesc aFontDescID) michael@0: { michael@0: NS_ABORT_IF_FALSE(gFontDescTable, "no lookup table, needs addref"); michael@0: if (gFontDescTable) { michael@0: return gFontDescTable->GetStringValue(int32_t(aFontDescID)); michael@0: } else { michael@0: static nsDependentCString sNullStr(""); michael@0: return sNullStr; michael@0: } michael@0: } michael@0: michael@0: nsCSSProperty michael@0: nsCSSProps::OtherNameFor(nsCSSProperty aProperty) michael@0: { michael@0: switch (aProperty) { michael@0: case eCSSProperty_border_left_color_value: michael@0: return eCSSProperty_border_left_color; michael@0: case eCSSProperty_border_left_style_value: michael@0: return eCSSProperty_border_left_style; michael@0: case eCSSProperty_border_left_width_value: michael@0: return eCSSProperty_border_left_width; michael@0: case eCSSProperty_border_right_color_value: michael@0: return eCSSProperty_border_right_color; michael@0: case eCSSProperty_border_right_style_value: michael@0: return eCSSProperty_border_right_style; michael@0: case eCSSProperty_border_right_width_value: michael@0: return eCSSProperty_border_right_width; michael@0: case eCSSProperty_margin_left_value: michael@0: return eCSSProperty_margin_left; michael@0: case eCSSProperty_margin_right_value: michael@0: return eCSSProperty_margin_right; michael@0: case eCSSProperty_padding_left_value: michael@0: return eCSSProperty_padding_left; michael@0: case eCSSProperty_padding_right_value: michael@0: return eCSSProperty_padding_right; michael@0: default: michael@0: NS_ABORT_IF_FALSE(false, "bad caller"); michael@0: } michael@0: return eCSSProperty_UNKNOWN; michael@0: } michael@0: michael@0: /***************************************************************************/ michael@0: michael@0: const KTableValue nsCSSProps::kAnimationDirectionKTable[] = { michael@0: eCSSKeyword_normal, NS_STYLE_ANIMATION_DIRECTION_NORMAL, michael@0: eCSSKeyword_reverse, NS_STYLE_ANIMATION_DIRECTION_REVERSE, michael@0: eCSSKeyword_alternate, NS_STYLE_ANIMATION_DIRECTION_ALTERNATE, michael@0: eCSSKeyword_alternate_reverse, NS_STYLE_ANIMATION_DIRECTION_ALTERNATE_REVERSE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kAnimationFillModeKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_ANIMATION_FILL_MODE_NONE, michael@0: eCSSKeyword_forwards, NS_STYLE_ANIMATION_FILL_MODE_FORWARDS, michael@0: eCSSKeyword_backwards, NS_STYLE_ANIMATION_FILL_MODE_BACKWARDS, michael@0: eCSSKeyword_both, NS_STYLE_ANIMATION_FILL_MODE_BOTH, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kAnimationIterationCountKTable[] = { michael@0: eCSSKeyword_infinite, NS_STYLE_ANIMATION_ITERATION_COUNT_INFINITE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kAnimationPlayStateKTable[] = { michael@0: eCSSKeyword_running, NS_STYLE_ANIMATION_PLAY_STATE_RUNNING, michael@0: eCSSKeyword_paused, NS_STYLE_ANIMATION_PLAY_STATE_PAUSED, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kAppearanceKTable[] = { michael@0: eCSSKeyword_none, NS_THEME_NONE, michael@0: eCSSKeyword_button, NS_THEME_BUTTON, michael@0: eCSSKeyword_radio, NS_THEME_RADIO, michael@0: eCSSKeyword_checkbox, NS_THEME_CHECKBOX, michael@0: eCSSKeyword_button_bevel, NS_THEME_BUTTON_BEVEL, michael@0: eCSSKeyword_toolbox, NS_THEME_TOOLBOX, michael@0: eCSSKeyword_toolbar, NS_THEME_TOOLBAR, michael@0: eCSSKeyword_toolbarbutton, NS_THEME_TOOLBAR_BUTTON, michael@0: eCSSKeyword_toolbargripper, NS_THEME_TOOLBAR_GRIPPER, michael@0: eCSSKeyword_dualbutton, NS_THEME_TOOLBAR_DUAL_BUTTON, michael@0: eCSSKeyword_toolbarbutton_dropdown, NS_THEME_TOOLBAR_BUTTON_DROPDOWN, michael@0: eCSSKeyword_button_arrow_up, NS_THEME_BUTTON_ARROW_UP, michael@0: eCSSKeyword_button_arrow_down, NS_THEME_BUTTON_ARROW_DOWN, michael@0: eCSSKeyword_button_arrow_next, NS_THEME_BUTTON_ARROW_NEXT, michael@0: eCSSKeyword_button_arrow_previous, NS_THEME_BUTTON_ARROW_PREVIOUS, michael@0: eCSSKeyword_meterbar, NS_THEME_METERBAR, michael@0: eCSSKeyword_meterchunk, NS_THEME_METERBAR_CHUNK, michael@0: eCSSKeyword_number_input, NS_THEME_NUMBER_INPUT, michael@0: eCSSKeyword_separator, NS_THEME_TOOLBAR_SEPARATOR, michael@0: eCSSKeyword_splitter, NS_THEME_SPLITTER, michael@0: eCSSKeyword_statusbar, NS_THEME_STATUSBAR, michael@0: eCSSKeyword_statusbarpanel, NS_THEME_STATUSBAR_PANEL, michael@0: eCSSKeyword_resizerpanel, NS_THEME_STATUSBAR_RESIZER_PANEL, michael@0: eCSSKeyword_resizer, NS_THEME_RESIZER, michael@0: eCSSKeyword_listbox, NS_THEME_LISTBOX, michael@0: eCSSKeyword_listitem, NS_THEME_LISTBOX_LISTITEM, michael@0: eCSSKeyword_treeview, NS_THEME_TREEVIEW, michael@0: eCSSKeyword_treeitem, NS_THEME_TREEVIEW_TREEITEM, michael@0: eCSSKeyword_treetwisty, NS_THEME_TREEVIEW_TWISTY, michael@0: eCSSKeyword_treetwistyopen, NS_THEME_TREEVIEW_TWISTY_OPEN, michael@0: eCSSKeyword_treeline, NS_THEME_TREEVIEW_LINE, michael@0: eCSSKeyword_treeheader, NS_THEME_TREEVIEW_HEADER, michael@0: eCSSKeyword_treeheadercell, NS_THEME_TREEVIEW_HEADER_CELL, michael@0: eCSSKeyword_treeheadersortarrow, NS_THEME_TREEVIEW_HEADER_SORTARROW, michael@0: eCSSKeyword_progressbar, NS_THEME_PROGRESSBAR, michael@0: eCSSKeyword_progresschunk, NS_THEME_PROGRESSBAR_CHUNK, michael@0: eCSSKeyword_progressbar_vertical, NS_THEME_PROGRESSBAR_VERTICAL, michael@0: eCSSKeyword_progresschunk_vertical, NS_THEME_PROGRESSBAR_CHUNK_VERTICAL, michael@0: eCSSKeyword_tab, NS_THEME_TAB, michael@0: eCSSKeyword_tabpanels, NS_THEME_TAB_PANELS, michael@0: eCSSKeyword_tabpanel, NS_THEME_TAB_PANEL, michael@0: eCSSKeyword_tab_scroll_arrow_back, NS_THEME_TAB_SCROLLARROW_BACK, michael@0: eCSSKeyword_tab_scroll_arrow_forward, NS_THEME_TAB_SCROLLARROW_FORWARD, michael@0: eCSSKeyword_tooltip, NS_THEME_TOOLTIP, michael@0: eCSSKeyword_spinner, NS_THEME_SPINNER, michael@0: eCSSKeyword_spinner_upbutton, NS_THEME_SPINNER_UP_BUTTON, michael@0: eCSSKeyword_spinner_downbutton, NS_THEME_SPINNER_DOWN_BUTTON, michael@0: eCSSKeyword_spinner_textfield, NS_THEME_SPINNER_TEXTFIELD, michael@0: eCSSKeyword_scrollbar, NS_THEME_SCROLLBAR, michael@0: eCSSKeyword_scrollbar_small, NS_THEME_SCROLLBAR_SMALL, michael@0: eCSSKeyword_scrollbarbutton_up, NS_THEME_SCROLLBAR_BUTTON_UP, michael@0: eCSSKeyword_scrollbarbutton_down, NS_THEME_SCROLLBAR_BUTTON_DOWN, michael@0: eCSSKeyword_scrollbarbutton_left, NS_THEME_SCROLLBAR_BUTTON_LEFT, michael@0: eCSSKeyword_scrollbarbutton_right, NS_THEME_SCROLLBAR_BUTTON_RIGHT, michael@0: eCSSKeyword_scrollbartrack_horizontal, NS_THEME_SCROLLBAR_TRACK_HORIZONTAL, michael@0: eCSSKeyword_scrollbartrack_vertical, NS_THEME_SCROLLBAR_TRACK_VERTICAL, michael@0: eCSSKeyword_scrollbarthumb_horizontal, NS_THEME_SCROLLBAR_THUMB_HORIZONTAL, michael@0: eCSSKeyword_scrollbarthumb_vertical, NS_THEME_SCROLLBAR_THUMB_VERTICAL, michael@0: eCSSKeyword_textfield, NS_THEME_TEXTFIELD, michael@0: eCSSKeyword_textfield_multiline, NS_THEME_TEXTFIELD_MULTILINE, michael@0: eCSSKeyword_caret, NS_THEME_TEXTFIELD_CARET, michael@0: eCSSKeyword_searchfield, NS_THEME_SEARCHFIELD, michael@0: eCSSKeyword_menulist, NS_THEME_DROPDOWN, michael@0: eCSSKeyword_menulist_button, NS_THEME_DROPDOWN_BUTTON, michael@0: eCSSKeyword_menulist_text, NS_THEME_DROPDOWN_TEXT, michael@0: eCSSKeyword_menulist_textfield, NS_THEME_DROPDOWN_TEXTFIELD, michael@0: eCSSKeyword_range, NS_THEME_RANGE, michael@0: eCSSKeyword_range_thumb, NS_THEME_RANGE_THUMB, michael@0: eCSSKeyword_scale_horizontal, NS_THEME_SCALE_HORIZONTAL, michael@0: eCSSKeyword_scale_vertical, NS_THEME_SCALE_VERTICAL, michael@0: eCSSKeyword_scalethumb_horizontal, NS_THEME_SCALE_THUMB_HORIZONTAL, michael@0: eCSSKeyword_scalethumb_vertical, NS_THEME_SCALE_THUMB_VERTICAL, michael@0: eCSSKeyword_scalethumbstart, NS_THEME_SCALE_THUMB_START, michael@0: eCSSKeyword_scalethumbend, NS_THEME_SCALE_THUMB_END, michael@0: eCSSKeyword_scalethumbtick, NS_THEME_SCALE_TICK, michael@0: eCSSKeyword_groupbox, NS_THEME_GROUPBOX, michael@0: eCSSKeyword_checkbox_container, NS_THEME_CHECKBOX_CONTAINER, michael@0: eCSSKeyword_radio_container, NS_THEME_RADIO_CONTAINER, michael@0: eCSSKeyword_checkbox_label, NS_THEME_CHECKBOX_LABEL, michael@0: eCSSKeyword_radio_label, NS_THEME_RADIO_LABEL, michael@0: eCSSKeyword_button_focus, NS_THEME_BUTTON_FOCUS, michael@0: eCSSKeyword_window, NS_THEME_WINDOW, michael@0: eCSSKeyword_dialog, NS_THEME_DIALOG, michael@0: eCSSKeyword_menubar, NS_THEME_MENUBAR, michael@0: eCSSKeyword_menupopup, NS_THEME_MENUPOPUP, michael@0: eCSSKeyword_menuitem, NS_THEME_MENUITEM, michael@0: eCSSKeyword_checkmenuitem, NS_THEME_CHECKMENUITEM, michael@0: eCSSKeyword_radiomenuitem, NS_THEME_RADIOMENUITEM, michael@0: eCSSKeyword_menucheckbox, NS_THEME_MENUCHECKBOX, michael@0: eCSSKeyword_menuradio, NS_THEME_MENURADIO, michael@0: eCSSKeyword_menuseparator, NS_THEME_MENUSEPARATOR, michael@0: eCSSKeyword_menuarrow, NS_THEME_MENUARROW, michael@0: eCSSKeyword_menuimage, NS_THEME_MENUIMAGE, michael@0: eCSSKeyword_menuitemtext, NS_THEME_MENUITEMTEXT, michael@0: eCSSKeyword__moz_win_media_toolbox, NS_THEME_WIN_MEDIA_TOOLBOX, michael@0: eCSSKeyword__moz_win_communications_toolbox, NS_THEME_WIN_COMMUNICATIONS_TOOLBOX, michael@0: eCSSKeyword__moz_win_browsertabbar_toolbox, NS_THEME_WIN_BROWSER_TAB_BAR_TOOLBOX, michael@0: eCSSKeyword__moz_win_glass, NS_THEME_WIN_GLASS, michael@0: eCSSKeyword__moz_win_borderless_glass, NS_THEME_WIN_BORDERLESS_GLASS, michael@0: eCSSKeyword__moz_mac_unified_toolbar, NS_THEME_MOZ_MAC_UNIFIED_TOOLBAR, michael@0: eCSSKeyword__moz_mac_fullscreen_button, NS_THEME_MOZ_MAC_FULLSCREEN_BUTTON, michael@0: eCSSKeyword__moz_mac_help_button, NS_THEME_MOZ_MAC_HELP_BUTTON, michael@0: eCSSKeyword__moz_window_titlebar, NS_THEME_WINDOW_TITLEBAR, michael@0: eCSSKeyword__moz_window_titlebar_maximized, NS_THEME_WINDOW_TITLEBAR_MAXIMIZED, michael@0: eCSSKeyword__moz_window_frame_left, NS_THEME_WINDOW_FRAME_LEFT, michael@0: eCSSKeyword__moz_window_frame_right, NS_THEME_WINDOW_FRAME_RIGHT, michael@0: eCSSKeyword__moz_window_frame_bottom, NS_THEME_WINDOW_FRAME_BOTTOM, michael@0: eCSSKeyword__moz_window_button_close, NS_THEME_WINDOW_BUTTON_CLOSE, michael@0: eCSSKeyword__moz_window_button_minimize, NS_THEME_WINDOW_BUTTON_MINIMIZE, michael@0: eCSSKeyword__moz_window_button_maximize, NS_THEME_WINDOW_BUTTON_MAXIMIZE, michael@0: eCSSKeyword__moz_window_button_restore, NS_THEME_WINDOW_BUTTON_RESTORE, michael@0: eCSSKeyword__moz_window_button_box, NS_THEME_WINDOW_BUTTON_BOX, michael@0: eCSSKeyword__moz_window_button_box_maximized, NS_THEME_WINDOW_BUTTON_BOX_MAXIMIZED, michael@0: eCSSKeyword__moz_win_exclude_glass, NS_THEME_WIN_EXCLUDE_GLASS, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBackfaceVisibilityKTable[] = { michael@0: eCSSKeyword_visible, NS_STYLE_BACKFACE_VISIBILITY_VISIBLE, michael@0: eCSSKeyword_hidden, NS_STYLE_BACKFACE_VISIBILITY_HIDDEN, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kTransformStyleKTable[] = { michael@0: eCSSKeyword_flat, NS_STYLE_TRANSFORM_STYLE_FLAT, michael@0: eCSSKeyword_preserve_3d, NS_STYLE_TRANSFORM_STYLE_PRESERVE_3D, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBackgroundAttachmentKTable[] = { michael@0: eCSSKeyword_fixed, NS_STYLE_BG_ATTACHMENT_FIXED, michael@0: eCSSKeyword_scroll, NS_STYLE_BG_ATTACHMENT_SCROLL, michael@0: eCSSKeyword_local, NS_STYLE_BG_ATTACHMENT_LOCAL, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBackgroundInlinePolicyKTable[] = { michael@0: eCSSKeyword_each_box, NS_STYLE_BG_INLINE_POLICY_EACH_BOX, michael@0: eCSSKeyword_continuous, NS_STYLE_BG_INLINE_POLICY_CONTINUOUS, michael@0: eCSSKeyword_bounding_box, NS_STYLE_BG_INLINE_POLICY_BOUNDING_BOX, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: static_assert(NS_STYLE_BG_CLIP_BORDER == NS_STYLE_BG_ORIGIN_BORDER && michael@0: NS_STYLE_BG_CLIP_PADDING == NS_STYLE_BG_ORIGIN_PADDING && michael@0: NS_STYLE_BG_CLIP_CONTENT == NS_STYLE_BG_ORIGIN_CONTENT, michael@0: "bg-clip and bg-origin style constants must agree"); michael@0: const KTableValue nsCSSProps::kBackgroundOriginKTable[] = { michael@0: eCSSKeyword_border_box, NS_STYLE_BG_ORIGIN_BORDER, michael@0: eCSSKeyword_padding_box, NS_STYLE_BG_ORIGIN_PADDING, michael@0: eCSSKeyword_content_box, NS_STYLE_BG_ORIGIN_CONTENT, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: // Note: Don't change this table unless you update michael@0: // parseBackgroundPosition! michael@0: michael@0: const KTableValue nsCSSProps::kBackgroundPositionKTable[] = { michael@0: eCSSKeyword_center, NS_STYLE_BG_POSITION_CENTER, michael@0: eCSSKeyword_top, NS_STYLE_BG_POSITION_TOP, michael@0: eCSSKeyword_bottom, NS_STYLE_BG_POSITION_BOTTOM, michael@0: eCSSKeyword_left, NS_STYLE_BG_POSITION_LEFT, michael@0: eCSSKeyword_right, NS_STYLE_BG_POSITION_RIGHT, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBackgroundRepeatKTable[] = { michael@0: eCSSKeyword_no_repeat, NS_STYLE_BG_REPEAT_NO_REPEAT, michael@0: eCSSKeyword_repeat, NS_STYLE_BG_REPEAT_REPEAT, michael@0: eCSSKeyword_repeat_x, NS_STYLE_BG_REPEAT_REPEAT_X, michael@0: eCSSKeyword_repeat_y, NS_STYLE_BG_REPEAT_REPEAT_Y, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBackgroundRepeatPartKTable[] = { michael@0: eCSSKeyword_no_repeat, NS_STYLE_BG_REPEAT_NO_REPEAT, michael@0: eCSSKeyword_repeat, NS_STYLE_BG_REPEAT_REPEAT, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBackgroundSizeKTable[] = { michael@0: eCSSKeyword_contain, NS_STYLE_BG_SIZE_CONTAIN, michael@0: eCSSKeyword_cover, NS_STYLE_BG_SIZE_COVER, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBlendModeKTable[] = { michael@0: eCSSKeyword_normal, NS_STYLE_BLEND_NORMAL, michael@0: eCSSKeyword_multiply, NS_STYLE_BLEND_MULTIPLY, michael@0: eCSSKeyword_screen, NS_STYLE_BLEND_SCREEN, michael@0: eCSSKeyword_overlay, NS_STYLE_BLEND_OVERLAY, michael@0: eCSSKeyword_darken, NS_STYLE_BLEND_DARKEN, michael@0: eCSSKeyword_lighten, NS_STYLE_BLEND_LIGHTEN, michael@0: eCSSKeyword_color_dodge, NS_STYLE_BLEND_COLOR_DODGE, michael@0: eCSSKeyword_color_burn, NS_STYLE_BLEND_COLOR_BURN, michael@0: eCSSKeyword_hard_light, NS_STYLE_BLEND_HARD_LIGHT, michael@0: eCSSKeyword_soft_light, NS_STYLE_BLEND_SOFT_LIGHT, michael@0: eCSSKeyword_difference, NS_STYLE_BLEND_DIFFERENCE, michael@0: eCSSKeyword_exclusion, NS_STYLE_BLEND_EXCLUSION, michael@0: eCSSKeyword_hue, NS_STYLE_BLEND_HUE, michael@0: eCSSKeyword_saturation, NS_STYLE_BLEND_SATURATION, michael@0: eCSSKeyword_color, NS_STYLE_BLEND_COLOR, michael@0: eCSSKeyword_luminosity, NS_STYLE_BLEND_LUMINOSITY, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBorderCollapseKTable[] = { michael@0: eCSSKeyword_collapse, NS_STYLE_BORDER_COLLAPSE, michael@0: eCSSKeyword_separate, NS_STYLE_BORDER_SEPARATE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBorderColorKTable[] = { michael@0: eCSSKeyword__moz_use_text_color, NS_STYLE_COLOR_MOZ_USE_TEXT_COLOR, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBorderImageRepeatKTable[] = { michael@0: eCSSKeyword_stretch, NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH, michael@0: eCSSKeyword_repeat, NS_STYLE_BORDER_IMAGE_REPEAT_REPEAT, michael@0: eCSSKeyword_round, NS_STYLE_BORDER_IMAGE_REPEAT_ROUND, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBorderImageSliceKTable[] = { michael@0: eCSSKeyword_fill, NS_STYLE_BORDER_IMAGE_SLICE_FILL, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBorderStyleKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_BORDER_STYLE_NONE, michael@0: eCSSKeyword_hidden, NS_STYLE_BORDER_STYLE_HIDDEN, michael@0: eCSSKeyword_dotted, NS_STYLE_BORDER_STYLE_DOTTED, michael@0: eCSSKeyword_dashed, NS_STYLE_BORDER_STYLE_DASHED, michael@0: eCSSKeyword_solid, NS_STYLE_BORDER_STYLE_SOLID, michael@0: eCSSKeyword_double, NS_STYLE_BORDER_STYLE_DOUBLE, michael@0: eCSSKeyword_groove, NS_STYLE_BORDER_STYLE_GROOVE, michael@0: eCSSKeyword_ridge, NS_STYLE_BORDER_STYLE_RIDGE, michael@0: eCSSKeyword_inset, NS_STYLE_BORDER_STYLE_INSET, michael@0: eCSSKeyword_outset, NS_STYLE_BORDER_STYLE_OUTSET, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBorderWidthKTable[] = { michael@0: eCSSKeyword_thin, NS_STYLE_BORDER_WIDTH_THIN, michael@0: eCSSKeyword_medium, NS_STYLE_BORDER_WIDTH_MEDIUM, michael@0: eCSSKeyword_thick, NS_STYLE_BORDER_WIDTH_THICK, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBoxPropSourceKTable[] = { michael@0: eCSSKeyword_physical, NS_BOXPROP_SOURCE_PHYSICAL, michael@0: eCSSKeyword_logical, NS_BOXPROP_SOURCE_LOGICAL, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBoxShadowTypeKTable[] = { michael@0: eCSSKeyword_inset, NS_STYLE_BOX_SHADOW_INSET, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBoxSizingKTable[] = { michael@0: eCSSKeyword_content_box, NS_STYLE_BOX_SIZING_CONTENT, michael@0: eCSSKeyword_border_box, NS_STYLE_BOX_SIZING_BORDER, michael@0: eCSSKeyword_padding_box, NS_STYLE_BOX_SIZING_PADDING, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kCaptionSideKTable[] = { michael@0: eCSSKeyword_top, NS_STYLE_CAPTION_SIDE_TOP, michael@0: eCSSKeyword_right, NS_STYLE_CAPTION_SIDE_RIGHT, michael@0: eCSSKeyword_bottom, NS_STYLE_CAPTION_SIDE_BOTTOM, michael@0: eCSSKeyword_left, NS_STYLE_CAPTION_SIDE_LEFT, michael@0: eCSSKeyword_top_outside, NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE, michael@0: eCSSKeyword_bottom_outside, NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kClearKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_CLEAR_NONE, michael@0: eCSSKeyword_left, NS_STYLE_CLEAR_LEFT, michael@0: eCSSKeyword_right, NS_STYLE_CLEAR_RIGHT, michael@0: eCSSKeyword_both, NS_STYLE_CLEAR_BOTH, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: // See also kContextPatternKTable for SVG paint-specific values michael@0: const KTableValue nsCSSProps::kColorKTable[] = { michael@0: eCSSKeyword_activeborder, LookAndFeel::eColorID_activeborder, michael@0: eCSSKeyword_activecaption, LookAndFeel::eColorID_activecaption, michael@0: eCSSKeyword_appworkspace, LookAndFeel::eColorID_appworkspace, michael@0: eCSSKeyword_background, LookAndFeel::eColorID_background, michael@0: eCSSKeyword_buttonface, LookAndFeel::eColorID_buttonface, michael@0: eCSSKeyword_buttonhighlight, LookAndFeel::eColorID_buttonhighlight, michael@0: eCSSKeyword_buttonshadow, LookAndFeel::eColorID_buttonshadow, michael@0: eCSSKeyword_buttontext, LookAndFeel::eColorID_buttontext, michael@0: eCSSKeyword_captiontext, LookAndFeel::eColorID_captiontext, michael@0: eCSSKeyword_graytext, LookAndFeel::eColorID_graytext, michael@0: eCSSKeyword_highlight, LookAndFeel::eColorID_highlight, michael@0: eCSSKeyword_highlighttext, LookAndFeel::eColorID_highlighttext, michael@0: eCSSKeyword_inactiveborder, LookAndFeel::eColorID_inactiveborder, michael@0: eCSSKeyword_inactivecaption, LookAndFeel::eColorID_inactivecaption, michael@0: eCSSKeyword_inactivecaptiontext, LookAndFeel::eColorID_inactivecaptiontext, michael@0: eCSSKeyword_infobackground, LookAndFeel::eColorID_infobackground, michael@0: eCSSKeyword_infotext, LookAndFeel::eColorID_infotext, michael@0: eCSSKeyword_menu, LookAndFeel::eColorID_menu, michael@0: eCSSKeyword_menutext, LookAndFeel::eColorID_menutext, michael@0: eCSSKeyword_scrollbar, LookAndFeel::eColorID_scrollbar, michael@0: eCSSKeyword_threeddarkshadow, LookAndFeel::eColorID_threeddarkshadow, michael@0: eCSSKeyword_threedface, LookAndFeel::eColorID_threedface, michael@0: eCSSKeyword_threedhighlight, LookAndFeel::eColorID_threedhighlight, michael@0: eCSSKeyword_threedlightshadow, LookAndFeel::eColorID_threedlightshadow, michael@0: eCSSKeyword_threedshadow, LookAndFeel::eColorID_threedshadow, michael@0: eCSSKeyword_window, LookAndFeel::eColorID_window, michael@0: eCSSKeyword_windowframe, LookAndFeel::eColorID_windowframe, michael@0: eCSSKeyword_windowtext, LookAndFeel::eColorID_windowtext, michael@0: eCSSKeyword__moz_activehyperlinktext, NS_COLOR_MOZ_ACTIVEHYPERLINKTEXT, michael@0: eCSSKeyword__moz_buttondefault, LookAndFeel::eColorID__moz_buttondefault, michael@0: eCSSKeyword__moz_buttonhoverface, LookAndFeel::eColorID__moz_buttonhoverface, michael@0: eCSSKeyword__moz_buttonhovertext, LookAndFeel::eColorID__moz_buttonhovertext, michael@0: eCSSKeyword__moz_cellhighlight, LookAndFeel::eColorID__moz_cellhighlight, michael@0: eCSSKeyword__moz_cellhighlighttext, LookAndFeel::eColorID__moz_cellhighlighttext, michael@0: eCSSKeyword__moz_eventreerow, LookAndFeel::eColorID__moz_eventreerow, michael@0: eCSSKeyword__moz_field, LookAndFeel::eColorID__moz_field, michael@0: eCSSKeyword__moz_fieldtext, LookAndFeel::eColorID__moz_fieldtext, michael@0: eCSSKeyword__moz_default_background_color, NS_COLOR_MOZ_DEFAULT_BACKGROUND_COLOR, michael@0: eCSSKeyword__moz_default_color, NS_COLOR_MOZ_DEFAULT_COLOR, michael@0: eCSSKeyword__moz_dialog, LookAndFeel::eColorID__moz_dialog, michael@0: eCSSKeyword__moz_dialogtext, LookAndFeel::eColorID__moz_dialogtext, michael@0: eCSSKeyword__moz_dragtargetzone, LookAndFeel::eColorID__moz_dragtargetzone, michael@0: eCSSKeyword__moz_hyperlinktext, NS_COLOR_MOZ_HYPERLINKTEXT, michael@0: eCSSKeyword__moz_html_cellhighlight, LookAndFeel::eColorID__moz_html_cellhighlight, michael@0: eCSSKeyword__moz_html_cellhighlighttext, LookAndFeel::eColorID__moz_html_cellhighlighttext, michael@0: eCSSKeyword__moz_mac_chrome_active, LookAndFeel::eColorID__moz_mac_chrome_active, michael@0: eCSSKeyword__moz_mac_chrome_inactive, LookAndFeel::eColorID__moz_mac_chrome_inactive, michael@0: eCSSKeyword__moz_mac_focusring, LookAndFeel::eColorID__moz_mac_focusring, michael@0: eCSSKeyword__moz_mac_menuselect, LookAndFeel::eColorID__moz_mac_menuselect, michael@0: eCSSKeyword__moz_mac_menushadow, LookAndFeel::eColorID__moz_mac_menushadow, michael@0: eCSSKeyword__moz_mac_menutextdisable, LookAndFeel::eColorID__moz_mac_menutextdisable, michael@0: eCSSKeyword__moz_mac_menutextselect, LookAndFeel::eColorID__moz_mac_menutextselect, michael@0: eCSSKeyword__moz_mac_disabledtoolbartext, LookAndFeel::eColorID__moz_mac_disabledtoolbartext, michael@0: eCSSKeyword__moz_mac_secondaryhighlight, LookAndFeel::eColorID__moz_mac_secondaryhighlight, michael@0: eCSSKeyword__moz_menuhover, LookAndFeel::eColorID__moz_menuhover, michael@0: eCSSKeyword__moz_menuhovertext, LookAndFeel::eColorID__moz_menuhovertext, michael@0: eCSSKeyword__moz_menubartext, LookAndFeel::eColorID__moz_menubartext, michael@0: eCSSKeyword__moz_menubarhovertext, LookAndFeel::eColorID__moz_menubarhovertext, michael@0: eCSSKeyword__moz_oddtreerow, LookAndFeel::eColorID__moz_oddtreerow, michael@0: eCSSKeyword__moz_visitedhyperlinktext, NS_COLOR_MOZ_VISITEDHYPERLINKTEXT, michael@0: eCSSKeyword_currentcolor, NS_COLOR_CURRENTCOLOR, michael@0: eCSSKeyword__moz_win_mediatext, LookAndFeel::eColorID__moz_win_mediatext, michael@0: eCSSKeyword__moz_win_communicationstext, LookAndFeel::eColorID__moz_win_communicationstext, michael@0: eCSSKeyword__moz_nativehyperlinktext, LookAndFeel::eColorID__moz_nativehyperlinktext, michael@0: eCSSKeyword__moz_comboboxtext, LookAndFeel::eColorID__moz_comboboxtext, michael@0: eCSSKeyword__moz_combobox, LookAndFeel::eColorID__moz_combobox, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kContentKTable[] = { michael@0: eCSSKeyword_open_quote, NS_STYLE_CONTENT_OPEN_QUOTE, michael@0: eCSSKeyword_close_quote, NS_STYLE_CONTENT_CLOSE_QUOTE, michael@0: eCSSKeyword_no_open_quote, NS_STYLE_CONTENT_NO_OPEN_QUOTE, michael@0: eCSSKeyword_no_close_quote, NS_STYLE_CONTENT_NO_CLOSE_QUOTE, michael@0: eCSSKeyword__moz_alt_content, NS_STYLE_CONTENT_ALT_CONTENT, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kControlCharacterVisibilityKTable[] = { michael@0: eCSSKeyword_hidden, NS_STYLE_CONTROL_CHARACTER_VISIBILITY_HIDDEN, michael@0: eCSSKeyword_visible, NS_STYLE_CONTROL_CHARACTER_VISIBILITY_VISIBLE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kCursorKTable[] = { michael@0: // CSS 2.0 michael@0: eCSSKeyword_auto, NS_STYLE_CURSOR_AUTO, michael@0: eCSSKeyword_crosshair, NS_STYLE_CURSOR_CROSSHAIR, michael@0: eCSSKeyword_default, NS_STYLE_CURSOR_DEFAULT, michael@0: eCSSKeyword_pointer, NS_STYLE_CURSOR_POINTER, michael@0: eCSSKeyword_move, NS_STYLE_CURSOR_MOVE, michael@0: eCSSKeyword_e_resize, NS_STYLE_CURSOR_E_RESIZE, michael@0: eCSSKeyword_ne_resize, NS_STYLE_CURSOR_NE_RESIZE, michael@0: eCSSKeyword_nw_resize, NS_STYLE_CURSOR_NW_RESIZE, michael@0: eCSSKeyword_n_resize, NS_STYLE_CURSOR_N_RESIZE, michael@0: eCSSKeyword_se_resize, NS_STYLE_CURSOR_SE_RESIZE, michael@0: eCSSKeyword_sw_resize, NS_STYLE_CURSOR_SW_RESIZE, michael@0: eCSSKeyword_s_resize, NS_STYLE_CURSOR_S_RESIZE, michael@0: eCSSKeyword_w_resize, NS_STYLE_CURSOR_W_RESIZE, michael@0: eCSSKeyword_text, NS_STYLE_CURSOR_TEXT, michael@0: eCSSKeyword_wait, NS_STYLE_CURSOR_WAIT, michael@0: eCSSKeyword_help, NS_STYLE_CURSOR_HELP, michael@0: // CSS 2.1 michael@0: eCSSKeyword_progress, NS_STYLE_CURSOR_SPINNING, michael@0: // CSS3 basic user interface module michael@0: eCSSKeyword_copy, NS_STYLE_CURSOR_COPY, michael@0: eCSSKeyword_alias, NS_STYLE_CURSOR_ALIAS, michael@0: eCSSKeyword_context_menu, NS_STYLE_CURSOR_CONTEXT_MENU, michael@0: eCSSKeyword_cell, NS_STYLE_CURSOR_CELL, michael@0: eCSSKeyword_not_allowed, NS_STYLE_CURSOR_NOT_ALLOWED, michael@0: eCSSKeyword_col_resize, NS_STYLE_CURSOR_COL_RESIZE, michael@0: eCSSKeyword_row_resize, NS_STYLE_CURSOR_ROW_RESIZE, michael@0: eCSSKeyword_no_drop, NS_STYLE_CURSOR_NO_DROP, michael@0: eCSSKeyword_vertical_text, NS_STYLE_CURSOR_VERTICAL_TEXT, michael@0: eCSSKeyword_all_scroll, NS_STYLE_CURSOR_ALL_SCROLL, michael@0: eCSSKeyword_nesw_resize, NS_STYLE_CURSOR_NESW_RESIZE, michael@0: eCSSKeyword_nwse_resize, NS_STYLE_CURSOR_NWSE_RESIZE, michael@0: eCSSKeyword_ns_resize, NS_STYLE_CURSOR_NS_RESIZE, michael@0: eCSSKeyword_ew_resize, NS_STYLE_CURSOR_EW_RESIZE, michael@0: eCSSKeyword_none, NS_STYLE_CURSOR_NONE, michael@0: eCSSKeyword_grab, NS_STYLE_CURSOR_GRAB, michael@0: eCSSKeyword_grabbing, NS_STYLE_CURSOR_GRABBING, michael@0: eCSSKeyword_zoom_in, NS_STYLE_CURSOR_ZOOM_IN, michael@0: eCSSKeyword_zoom_out, NS_STYLE_CURSOR_ZOOM_OUT, michael@0: // -moz- prefixed vendor specific michael@0: eCSSKeyword__moz_grab, NS_STYLE_CURSOR_GRAB, michael@0: eCSSKeyword__moz_grabbing, NS_STYLE_CURSOR_GRABBING, michael@0: eCSSKeyword__moz_zoom_in, NS_STYLE_CURSOR_ZOOM_IN, michael@0: eCSSKeyword__moz_zoom_out, NS_STYLE_CURSOR_ZOOM_OUT, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kDirectionKTable[] = { michael@0: eCSSKeyword_ltr, NS_STYLE_DIRECTION_LTR, michael@0: eCSSKeyword_rtl, NS_STYLE_DIRECTION_RTL, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: KTableValue nsCSSProps::kDisplayKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_DISPLAY_NONE, michael@0: eCSSKeyword_inline, NS_STYLE_DISPLAY_INLINE, michael@0: eCSSKeyword_block, NS_STYLE_DISPLAY_BLOCK, michael@0: eCSSKeyword_inline_block, NS_STYLE_DISPLAY_INLINE_BLOCK, michael@0: eCSSKeyword_list_item, NS_STYLE_DISPLAY_LIST_ITEM, michael@0: eCSSKeyword_table, NS_STYLE_DISPLAY_TABLE, michael@0: eCSSKeyword_inline_table, NS_STYLE_DISPLAY_INLINE_TABLE, michael@0: eCSSKeyword_table_row_group, NS_STYLE_DISPLAY_TABLE_ROW_GROUP, michael@0: eCSSKeyword_table_header_group, NS_STYLE_DISPLAY_TABLE_HEADER_GROUP, michael@0: eCSSKeyword_table_footer_group, NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP, michael@0: eCSSKeyword_table_row, NS_STYLE_DISPLAY_TABLE_ROW, michael@0: eCSSKeyword_table_column_group, NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP, michael@0: eCSSKeyword_table_column, NS_STYLE_DISPLAY_TABLE_COLUMN, michael@0: eCSSKeyword_table_cell, NS_STYLE_DISPLAY_TABLE_CELL, michael@0: eCSSKeyword_table_caption, NS_STYLE_DISPLAY_TABLE_CAPTION, michael@0: // Make sure this is kept in sync with the code in michael@0: // nsCSSFrameConstructor::ConstructXULFrame michael@0: eCSSKeyword__moz_box, NS_STYLE_DISPLAY_BOX, michael@0: eCSSKeyword__moz_inline_box, NS_STYLE_DISPLAY_INLINE_BOX, michael@0: #ifdef MOZ_XUL michael@0: eCSSKeyword__moz_grid, NS_STYLE_DISPLAY_XUL_GRID, michael@0: eCSSKeyword__moz_inline_grid, NS_STYLE_DISPLAY_INLINE_XUL_GRID, michael@0: eCSSKeyword__moz_grid_group, NS_STYLE_DISPLAY_XUL_GRID_GROUP, michael@0: eCSSKeyword__moz_grid_line, NS_STYLE_DISPLAY_XUL_GRID_LINE, michael@0: eCSSKeyword__moz_stack, NS_STYLE_DISPLAY_STACK, michael@0: eCSSKeyword__moz_inline_stack, NS_STYLE_DISPLAY_INLINE_STACK, michael@0: eCSSKeyword__moz_deck, NS_STYLE_DISPLAY_DECK, michael@0: eCSSKeyword__moz_popup, NS_STYLE_DISPLAY_POPUP, michael@0: eCSSKeyword__moz_groupbox, NS_STYLE_DISPLAY_GROUPBOX, michael@0: #endif michael@0: eCSSKeyword_flex, NS_STYLE_DISPLAY_FLEX, michael@0: eCSSKeyword_inline_flex, NS_STYLE_DISPLAY_INLINE_FLEX, michael@0: // The next two entries are controlled by the layout.css.grid.enabled pref. michael@0: eCSSKeyword_grid, NS_STYLE_DISPLAY_GRID, michael@0: eCSSKeyword_inline_grid, NS_STYLE_DISPLAY_INLINE_GRID, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kEmptyCellsKTable[] = { michael@0: eCSSKeyword_show, NS_STYLE_TABLE_EMPTY_CELLS_SHOW, michael@0: eCSSKeyword_hide, NS_STYLE_TABLE_EMPTY_CELLS_HIDE, michael@0: eCSSKeyword__moz_show_background, NS_STYLE_TABLE_EMPTY_CELLS_SHOW_BACKGROUND, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kAlignContentKTable[] = { michael@0: eCSSKeyword_flex_start, NS_STYLE_ALIGN_CONTENT_FLEX_START, michael@0: eCSSKeyword_flex_end, NS_STYLE_ALIGN_CONTENT_FLEX_END, michael@0: eCSSKeyword_center, NS_STYLE_ALIGN_CONTENT_CENTER, michael@0: eCSSKeyword_space_between, NS_STYLE_ALIGN_CONTENT_SPACE_BETWEEN, michael@0: eCSSKeyword_space_around, NS_STYLE_ALIGN_CONTENT_SPACE_AROUND, michael@0: eCSSKeyword_stretch, NS_STYLE_ALIGN_CONTENT_STRETCH, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kAlignItemsKTable[] = { michael@0: eCSSKeyword_flex_start, NS_STYLE_ALIGN_ITEMS_FLEX_START, michael@0: eCSSKeyword_flex_end, NS_STYLE_ALIGN_ITEMS_FLEX_END, michael@0: eCSSKeyword_center, NS_STYLE_ALIGN_ITEMS_CENTER, michael@0: eCSSKeyword_baseline, NS_STYLE_ALIGN_ITEMS_BASELINE, michael@0: eCSSKeyword_stretch, NS_STYLE_ALIGN_ITEMS_STRETCH, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: // Note: 'align-self' takes the same keywords as 'align-items', plus 'auto'. michael@0: const KTableValue nsCSSProps::kAlignSelfKTable[] = { michael@0: eCSSKeyword_flex_start, NS_STYLE_ALIGN_ITEMS_FLEX_START, michael@0: eCSSKeyword_flex_end, NS_STYLE_ALIGN_ITEMS_FLEX_END, michael@0: eCSSKeyword_center, NS_STYLE_ALIGN_ITEMS_CENTER, michael@0: eCSSKeyword_baseline, NS_STYLE_ALIGN_ITEMS_BASELINE, michael@0: eCSSKeyword_stretch, NS_STYLE_ALIGN_ITEMS_STRETCH, michael@0: eCSSKeyword_auto, NS_STYLE_ALIGN_SELF_AUTO, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFlexDirectionKTable[] = { michael@0: eCSSKeyword_row, NS_STYLE_FLEX_DIRECTION_ROW, michael@0: eCSSKeyword_row_reverse, NS_STYLE_FLEX_DIRECTION_ROW_REVERSE, michael@0: eCSSKeyword_column, NS_STYLE_FLEX_DIRECTION_COLUMN, michael@0: eCSSKeyword_column_reverse, NS_STYLE_FLEX_DIRECTION_COLUMN_REVERSE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFlexWrapKTable[] = { michael@0: eCSSKeyword_nowrap, NS_STYLE_FLEX_WRAP_NOWRAP, michael@0: eCSSKeyword_wrap, NS_STYLE_FLEX_WRAP_WRAP, michael@0: eCSSKeyword_wrap_reverse, NS_STYLE_FLEX_WRAP_WRAP_REVERSE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kJustifyContentKTable[] = { michael@0: eCSSKeyword_flex_start, NS_STYLE_JUSTIFY_CONTENT_FLEX_START, michael@0: eCSSKeyword_flex_end, NS_STYLE_JUSTIFY_CONTENT_FLEX_END, michael@0: eCSSKeyword_center, NS_STYLE_JUSTIFY_CONTENT_CENTER, michael@0: eCSSKeyword_space_between, NS_STYLE_JUSTIFY_CONTENT_SPACE_BETWEEN, michael@0: eCSSKeyword_space_around, NS_STYLE_JUSTIFY_CONTENT_SPACE_AROUND, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFloatKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_FLOAT_NONE, michael@0: eCSSKeyword_left, NS_STYLE_FLOAT_LEFT, michael@0: eCSSKeyword_right, NS_STYLE_FLOAT_RIGHT, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFloatEdgeKTable[] = { michael@0: eCSSKeyword_content_box, NS_STYLE_FLOAT_EDGE_CONTENT, michael@0: eCSSKeyword_margin_box, NS_STYLE_FLOAT_EDGE_MARGIN, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFontKTable[] = { michael@0: // CSS2. michael@0: eCSSKeyword_caption, NS_STYLE_FONT_CAPTION, michael@0: eCSSKeyword_icon, NS_STYLE_FONT_ICON, michael@0: eCSSKeyword_menu, NS_STYLE_FONT_MENU, michael@0: eCSSKeyword_message_box, NS_STYLE_FONT_MESSAGE_BOX, michael@0: eCSSKeyword_small_caption, NS_STYLE_FONT_SMALL_CAPTION, michael@0: eCSSKeyword_status_bar, NS_STYLE_FONT_STATUS_BAR, michael@0: michael@0: // Proposed for CSS3. michael@0: eCSSKeyword__moz_window, NS_STYLE_FONT_WINDOW, michael@0: eCSSKeyword__moz_document, NS_STYLE_FONT_DOCUMENT, michael@0: eCSSKeyword__moz_workspace, NS_STYLE_FONT_WORKSPACE, michael@0: eCSSKeyword__moz_desktop, NS_STYLE_FONT_DESKTOP, michael@0: eCSSKeyword__moz_info, NS_STYLE_FONT_INFO, michael@0: eCSSKeyword__moz_dialog, NS_STYLE_FONT_DIALOG, michael@0: eCSSKeyword__moz_button, NS_STYLE_FONT_BUTTON, michael@0: eCSSKeyword__moz_pull_down_menu, NS_STYLE_FONT_PULL_DOWN_MENU, michael@0: eCSSKeyword__moz_list, NS_STYLE_FONT_LIST, michael@0: eCSSKeyword__moz_field, NS_STYLE_FONT_FIELD, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFontKerningKTable[] = { michael@0: eCSSKeyword_auto, NS_FONT_KERNING_AUTO, michael@0: eCSSKeyword_none, NS_FONT_KERNING_NONE, michael@0: eCSSKeyword_normal, NS_FONT_KERNING_NORMAL, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFontSizeKTable[] = { michael@0: eCSSKeyword_xx_small, NS_STYLE_FONT_SIZE_XXSMALL, michael@0: eCSSKeyword_x_small, NS_STYLE_FONT_SIZE_XSMALL, michael@0: eCSSKeyword_small, NS_STYLE_FONT_SIZE_SMALL, michael@0: eCSSKeyword_medium, NS_STYLE_FONT_SIZE_MEDIUM, michael@0: eCSSKeyword_large, NS_STYLE_FONT_SIZE_LARGE, michael@0: eCSSKeyword_x_large, NS_STYLE_FONT_SIZE_XLARGE, michael@0: eCSSKeyword_xx_large, NS_STYLE_FONT_SIZE_XXLARGE, michael@0: eCSSKeyword_larger, NS_STYLE_FONT_SIZE_LARGER, michael@0: eCSSKeyword_smaller, NS_STYLE_FONT_SIZE_SMALLER, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFontSmoothingKTable[] = { michael@0: eCSSKeyword_auto, NS_FONT_SMOOTHING_AUTO, michael@0: eCSSKeyword_grayscale, NS_FONT_SMOOTHING_GRAYSCALE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFontStretchKTable[] = { michael@0: eCSSKeyword_ultra_condensed, NS_STYLE_FONT_STRETCH_ULTRA_CONDENSED, michael@0: eCSSKeyword_extra_condensed, NS_STYLE_FONT_STRETCH_EXTRA_CONDENSED, michael@0: eCSSKeyword_condensed, NS_STYLE_FONT_STRETCH_CONDENSED, michael@0: eCSSKeyword_semi_condensed, NS_STYLE_FONT_STRETCH_SEMI_CONDENSED, michael@0: eCSSKeyword_normal, NS_STYLE_FONT_STRETCH_NORMAL, michael@0: eCSSKeyword_semi_expanded, NS_STYLE_FONT_STRETCH_SEMI_EXPANDED, michael@0: eCSSKeyword_expanded, NS_STYLE_FONT_STRETCH_EXPANDED, michael@0: eCSSKeyword_extra_expanded, NS_STYLE_FONT_STRETCH_EXTRA_EXPANDED, michael@0: eCSSKeyword_ultra_expanded, NS_STYLE_FONT_STRETCH_ULTRA_EXPANDED, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFontStyleKTable[] = { michael@0: eCSSKeyword_normal, NS_STYLE_FONT_STYLE_NORMAL, michael@0: eCSSKeyword_italic, NS_STYLE_FONT_STYLE_ITALIC, michael@0: eCSSKeyword_oblique, NS_STYLE_FONT_STYLE_OBLIQUE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFontSynthesisKTable[] = { michael@0: eCSSKeyword_weight, NS_FONT_SYNTHESIS_WEIGHT, michael@0: eCSSKeyword_style, NS_FONT_SYNTHESIS_STYLE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: michael@0: const KTableValue nsCSSProps::kFontVariantKTable[] = { michael@0: eCSSKeyword_normal, NS_STYLE_FONT_VARIANT_NORMAL, michael@0: eCSSKeyword_small_caps, NS_STYLE_FONT_VARIANT_SMALL_CAPS, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFontVariantAlternatesKTable[] = { michael@0: eCSSKeyword_historical_forms, NS_FONT_VARIANT_ALTERNATES_HISTORICAL, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFontVariantAlternatesFuncsKTable[] = { michael@0: eCSSKeyword_stylistic, NS_FONT_VARIANT_ALTERNATES_STYLISTIC, michael@0: eCSSKeyword_styleset, NS_FONT_VARIANT_ALTERNATES_STYLESET, michael@0: eCSSKeyword_character_variant, NS_FONT_VARIANT_ALTERNATES_CHARACTER_VARIANT, michael@0: eCSSKeyword_swash, NS_FONT_VARIANT_ALTERNATES_SWASH, michael@0: eCSSKeyword_ornaments, NS_FONT_VARIANT_ALTERNATES_ORNAMENTS, michael@0: eCSSKeyword_annotation, NS_FONT_VARIANT_ALTERNATES_ANNOTATION, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFontVariantCapsKTable[] = { michael@0: eCSSKeyword_small_caps, NS_FONT_VARIANT_CAPS_SMALLCAPS, michael@0: eCSSKeyword_all_small_caps, NS_FONT_VARIANT_CAPS_ALLSMALL, michael@0: eCSSKeyword_petite_caps, NS_FONT_VARIANT_CAPS_PETITECAPS, michael@0: eCSSKeyword_all_petite_caps, NS_FONT_VARIANT_CAPS_ALLPETITE, michael@0: eCSSKeyword_titling_caps, NS_FONT_VARIANT_CAPS_TITLING, michael@0: eCSSKeyword_unicase, NS_FONT_VARIANT_CAPS_UNICASE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFontVariantEastAsianKTable[] = { michael@0: eCSSKeyword_jis78, NS_FONT_VARIANT_EAST_ASIAN_JIS78, michael@0: eCSSKeyword_jis83, NS_FONT_VARIANT_EAST_ASIAN_JIS83, michael@0: eCSSKeyword_jis90, NS_FONT_VARIANT_EAST_ASIAN_JIS90, michael@0: eCSSKeyword_jis04, NS_FONT_VARIANT_EAST_ASIAN_JIS04, michael@0: eCSSKeyword_simplified, NS_FONT_VARIANT_EAST_ASIAN_SIMPLIFIED, michael@0: eCSSKeyword_traditional, NS_FONT_VARIANT_EAST_ASIAN_TRADITIONAL, michael@0: eCSSKeyword_full_width, NS_FONT_VARIANT_EAST_ASIAN_FULL_WIDTH, michael@0: eCSSKeyword_proportional_width, NS_FONT_VARIANT_EAST_ASIAN_PROP_WIDTH, michael@0: eCSSKeyword_ruby, NS_FONT_VARIANT_EAST_ASIAN_RUBY, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFontVariantLigaturesKTable[] = { michael@0: eCSSKeyword_none, NS_FONT_VARIANT_LIGATURES_NONE, michael@0: eCSSKeyword_common_ligatures, NS_FONT_VARIANT_LIGATURES_COMMON, michael@0: eCSSKeyword_no_common_ligatures, NS_FONT_VARIANT_LIGATURES_NO_COMMON, michael@0: eCSSKeyword_discretionary_ligatures, NS_FONT_VARIANT_LIGATURES_DISCRETIONARY, michael@0: eCSSKeyword_no_discretionary_ligatures, NS_FONT_VARIANT_LIGATURES_NO_DISCRETIONARY, michael@0: eCSSKeyword_historical_ligatures, NS_FONT_VARIANT_LIGATURES_HISTORICAL, michael@0: eCSSKeyword_no_historical_ligatures, NS_FONT_VARIANT_LIGATURES_NO_HISTORICAL, michael@0: eCSSKeyword_contextual, NS_FONT_VARIANT_LIGATURES_CONTEXTUAL, michael@0: eCSSKeyword_no_contextual, NS_FONT_VARIANT_LIGATURES_NO_CONTEXTUAL, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFontVariantNumericKTable[] = { michael@0: eCSSKeyword_lining_nums, NS_FONT_VARIANT_NUMERIC_LINING, michael@0: eCSSKeyword_oldstyle_nums, NS_FONT_VARIANT_NUMERIC_OLDSTYLE, michael@0: eCSSKeyword_proportional_nums, NS_FONT_VARIANT_NUMERIC_PROPORTIONAL, michael@0: eCSSKeyword_tabular_nums, NS_FONT_VARIANT_NUMERIC_TABULAR, michael@0: eCSSKeyword_diagonal_fractions, NS_FONT_VARIANT_NUMERIC_DIAGONAL_FRACTIONS, michael@0: eCSSKeyword_stacked_fractions, NS_FONT_VARIANT_NUMERIC_STACKED_FRACTIONS, michael@0: eCSSKeyword_slashed_zero, NS_FONT_VARIANT_NUMERIC_SLASHZERO, michael@0: eCSSKeyword_ordinal, NS_FONT_VARIANT_NUMERIC_ORDINAL, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFontVariantPositionKTable[] = { michael@0: eCSSKeyword_super, NS_FONT_VARIANT_POSITION_SUPER, michael@0: eCSSKeyword_sub, NS_FONT_VARIANT_POSITION_SUB, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFontWeightKTable[] = { michael@0: eCSSKeyword_normal, NS_STYLE_FONT_WEIGHT_NORMAL, michael@0: eCSSKeyword_bold, NS_STYLE_FONT_WEIGHT_BOLD, michael@0: eCSSKeyword_bolder, NS_STYLE_FONT_WEIGHT_BOLDER, michael@0: eCSSKeyword_lighter, NS_STYLE_FONT_WEIGHT_LIGHTER, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kGridAutoFlowKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_GRID_AUTO_FLOW_NONE, michael@0: eCSSKeyword_column, NS_STYLE_GRID_AUTO_FLOW_COLUMN, michael@0: eCSSKeyword_row, NS_STYLE_GRID_AUTO_FLOW_ROW, michael@0: eCSSKeyword_dense, NS_STYLE_GRID_AUTO_FLOW_DENSE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kGridTrackBreadthKTable[] = { michael@0: eCSSKeyword_min_content, NS_STYLE_GRID_TRACK_BREADTH_MIN_CONTENT, michael@0: eCSSKeyword_max_content, NS_STYLE_GRID_TRACK_BREADTH_MAX_CONTENT, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kImageOrientationKTable[] = { michael@0: eCSSKeyword_flip, NS_STYLE_IMAGE_ORIENTATION_FLIP, michael@0: eCSSKeyword_from_image, NS_STYLE_IMAGE_ORIENTATION_FROM_IMAGE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kImageOrientationFlipKTable[] = { michael@0: eCSSKeyword_flip, NS_STYLE_IMAGE_ORIENTATION_FLIP, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kIMEModeKTable[] = { michael@0: eCSSKeyword_normal, NS_STYLE_IME_MODE_NORMAL, michael@0: eCSSKeyword_auto, NS_STYLE_IME_MODE_AUTO, michael@0: eCSSKeyword_active, NS_STYLE_IME_MODE_ACTIVE, michael@0: eCSSKeyword_disabled, NS_STYLE_IME_MODE_DISABLED, michael@0: eCSSKeyword_inactive, NS_STYLE_IME_MODE_INACTIVE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kLineHeightKTable[] = { michael@0: // -moz- prefixed, intended for internal use for single-line controls michael@0: eCSSKeyword__moz_block_height, NS_STYLE_LINE_HEIGHT_BLOCK_HEIGHT, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kListStylePositionKTable[] = { michael@0: eCSSKeyword_inside, NS_STYLE_LIST_STYLE_POSITION_INSIDE, michael@0: eCSSKeyword_outside, NS_STYLE_LIST_STYLE_POSITION_OUTSIDE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kListStyleKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_LIST_STYLE_NONE, michael@0: eCSSKeyword_disc, NS_STYLE_LIST_STYLE_DISC, michael@0: eCSSKeyword_circle, NS_STYLE_LIST_STYLE_CIRCLE, michael@0: eCSSKeyword_square, NS_STYLE_LIST_STYLE_SQUARE, michael@0: eCSSKeyword_decimal, NS_STYLE_LIST_STYLE_DECIMAL, michael@0: eCSSKeyword_decimal_leading_zero, NS_STYLE_LIST_STYLE_DECIMAL_LEADING_ZERO, michael@0: eCSSKeyword_lower_roman, NS_STYLE_LIST_STYLE_LOWER_ROMAN, michael@0: eCSSKeyword_upper_roman, NS_STYLE_LIST_STYLE_UPPER_ROMAN, michael@0: eCSSKeyword_lower_greek, NS_STYLE_LIST_STYLE_LOWER_GREEK, michael@0: eCSSKeyword_lower_alpha, NS_STYLE_LIST_STYLE_LOWER_ALPHA, michael@0: eCSSKeyword_lower_latin, NS_STYLE_LIST_STYLE_LOWER_LATIN, michael@0: eCSSKeyword_upper_alpha, NS_STYLE_LIST_STYLE_UPPER_ALPHA, michael@0: eCSSKeyword_upper_latin, NS_STYLE_LIST_STYLE_UPPER_LATIN, michael@0: eCSSKeyword_hebrew, NS_STYLE_LIST_STYLE_HEBREW, michael@0: eCSSKeyword_armenian, NS_STYLE_LIST_STYLE_ARMENIAN, michael@0: eCSSKeyword_georgian, NS_STYLE_LIST_STYLE_GEORGIAN, michael@0: eCSSKeyword_cjk_decimal, NS_STYLE_LIST_STYLE_CJK_DECIMAL, michael@0: eCSSKeyword_cjk_ideographic, NS_STYLE_LIST_STYLE_CJK_IDEOGRAPHIC, michael@0: eCSSKeyword_hiragana, NS_STYLE_LIST_STYLE_HIRAGANA, michael@0: eCSSKeyword_katakana, NS_STYLE_LIST_STYLE_KATAKANA, michael@0: eCSSKeyword_hiragana_iroha, NS_STYLE_LIST_STYLE_HIRAGANA_IROHA, michael@0: eCSSKeyword_katakana_iroha, NS_STYLE_LIST_STYLE_KATAKANA_IROHA, michael@0: eCSSKeyword_japanese_informal, NS_STYLE_LIST_STYLE_JAPANESE_INFORMAL, michael@0: eCSSKeyword_japanese_formal, NS_STYLE_LIST_STYLE_JAPANESE_FORMAL, michael@0: eCSSKeyword_korean_hangul_formal, NS_STYLE_LIST_STYLE_KOREAN_HANGUL_FORMAL, michael@0: eCSSKeyword_korean_hanja_informal, NS_STYLE_LIST_STYLE_KOREAN_HANJA_INFORMAL, michael@0: eCSSKeyword_korean_hanja_formal, NS_STYLE_LIST_STYLE_KOREAN_HANJA_FORMAL, michael@0: eCSSKeyword_simp_chinese_informal, NS_STYLE_LIST_STYLE_SIMP_CHINESE_INFORMAL, michael@0: eCSSKeyword_simp_chinese_formal, NS_STYLE_LIST_STYLE_SIMP_CHINESE_FORMAL, michael@0: eCSSKeyword_trad_chinese_informal, NS_STYLE_LIST_STYLE_TRAD_CHINESE_INFORMAL, michael@0: eCSSKeyword_trad_chinese_formal, NS_STYLE_LIST_STYLE_TRAD_CHINESE_FORMAL, michael@0: eCSSKeyword__moz_cjk_heavenly_stem, NS_STYLE_LIST_STYLE_MOZ_CJK_HEAVENLY_STEM, michael@0: eCSSKeyword__moz_cjk_earthly_branch, NS_STYLE_LIST_STYLE_MOZ_CJK_EARTHLY_BRANCH, michael@0: eCSSKeyword__moz_trad_chinese_informal, NS_STYLE_LIST_STYLE_MOZ_TRAD_CHINESE_INFORMAL, michael@0: eCSSKeyword__moz_trad_chinese_formal, NS_STYLE_LIST_STYLE_MOZ_TRAD_CHINESE_FORMAL, michael@0: eCSSKeyword__moz_simp_chinese_informal, NS_STYLE_LIST_STYLE_MOZ_SIMP_CHINESE_INFORMAL, michael@0: eCSSKeyword__moz_simp_chinese_formal, NS_STYLE_LIST_STYLE_MOZ_SIMP_CHINESE_FORMAL, michael@0: eCSSKeyword__moz_japanese_informal, NS_STYLE_LIST_STYLE_MOZ_JAPANESE_INFORMAL, michael@0: eCSSKeyword__moz_japanese_formal, NS_STYLE_LIST_STYLE_MOZ_JAPANESE_FORMAL, michael@0: eCSSKeyword__moz_arabic_indic, NS_STYLE_LIST_STYLE_MOZ_ARABIC_INDIC, michael@0: eCSSKeyword__moz_persian, NS_STYLE_LIST_STYLE_MOZ_PERSIAN, michael@0: eCSSKeyword__moz_urdu, NS_STYLE_LIST_STYLE_MOZ_URDU, michael@0: eCSSKeyword__moz_devanagari, NS_STYLE_LIST_STYLE_MOZ_DEVANAGARI, michael@0: eCSSKeyword__moz_gurmukhi, NS_STYLE_LIST_STYLE_MOZ_GURMUKHI, michael@0: eCSSKeyword__moz_gujarati, NS_STYLE_LIST_STYLE_MOZ_GUJARATI, michael@0: eCSSKeyword__moz_oriya, NS_STYLE_LIST_STYLE_MOZ_ORIYA, michael@0: eCSSKeyword__moz_kannada, NS_STYLE_LIST_STYLE_MOZ_KANNADA, michael@0: eCSSKeyword__moz_malayalam, NS_STYLE_LIST_STYLE_MOZ_MALAYALAM, michael@0: eCSSKeyword__moz_bengali, NS_STYLE_LIST_STYLE_MOZ_BENGALI, michael@0: eCSSKeyword__moz_tamil, NS_STYLE_LIST_STYLE_MOZ_TAMIL, michael@0: eCSSKeyword__moz_telugu, NS_STYLE_LIST_STYLE_MOZ_TELUGU, michael@0: eCSSKeyword__moz_thai, NS_STYLE_LIST_STYLE_MOZ_THAI, michael@0: eCSSKeyword__moz_lao, NS_STYLE_LIST_STYLE_MOZ_LAO, michael@0: eCSSKeyword__moz_myanmar, NS_STYLE_LIST_STYLE_MOZ_MYANMAR, michael@0: eCSSKeyword__moz_khmer, NS_STYLE_LIST_STYLE_MOZ_KHMER, michael@0: eCSSKeyword__moz_hangul, NS_STYLE_LIST_STYLE_MOZ_HANGUL, michael@0: eCSSKeyword__moz_hangul_consonant, NS_STYLE_LIST_STYLE_MOZ_HANGUL_CONSONANT, michael@0: eCSSKeyword__moz_ethiopic_halehame, NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME, michael@0: eCSSKeyword__moz_ethiopic_numeric, NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_NUMERIC, michael@0: eCSSKeyword__moz_ethiopic_halehame_am, NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME_AM, michael@0: eCSSKeyword__moz_ethiopic_halehame_ti_er, NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME_TI_ER, michael@0: eCSSKeyword__moz_ethiopic_halehame_ti_et, NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME_TI_ET, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kMathVariantKTable[] = { michael@0: eCSSKeyword_none, NS_MATHML_MATHVARIANT_NONE, michael@0: eCSSKeyword_normal, NS_MATHML_MATHVARIANT_NORMAL, michael@0: eCSSKeyword_bold, NS_MATHML_MATHVARIANT_BOLD, michael@0: eCSSKeyword_italic, NS_MATHML_MATHVARIANT_ITALIC, michael@0: eCSSKeyword_bold_italic, NS_MATHML_MATHVARIANT_BOLD_ITALIC, michael@0: eCSSKeyword_script, NS_MATHML_MATHVARIANT_SCRIPT, michael@0: eCSSKeyword_bold_script, NS_MATHML_MATHVARIANT_BOLD_SCRIPT, michael@0: eCSSKeyword_fraktur, NS_MATHML_MATHVARIANT_FRAKTUR, michael@0: eCSSKeyword_double_struck, NS_MATHML_MATHVARIANT_DOUBLE_STRUCK, michael@0: eCSSKeyword_bold_fraktur, NS_MATHML_MATHVARIANT_BOLD_FRAKTUR, michael@0: eCSSKeyword_sans_serif, NS_MATHML_MATHVARIANT_SANS_SERIF, michael@0: eCSSKeyword_bold_sans_serif, NS_MATHML_MATHVARIANT_BOLD_SANS_SERIF, michael@0: eCSSKeyword_sans_serif_italic, NS_MATHML_MATHVARIANT_SANS_SERIF_ITALIC, michael@0: eCSSKeyword_sans_serif_bold_italic, NS_MATHML_MATHVARIANT_SANS_SERIF_BOLD_ITALIC, michael@0: eCSSKeyword_monospace, NS_MATHML_MATHVARIANT_MONOSPACE, michael@0: eCSSKeyword_initial, NS_MATHML_MATHVARIANT_INITIAL, michael@0: eCSSKeyword_tailed, NS_MATHML_MATHVARIANT_TAILED, michael@0: eCSSKeyword_looped, NS_MATHML_MATHVARIANT_LOOPED, michael@0: eCSSKeyword_stretched, NS_MATHML_MATHVARIANT_STRETCHED, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kMathDisplayKTable[] = { michael@0: eCSSKeyword_inline, NS_MATHML_DISPLAYSTYLE_INLINE, michael@0: eCSSKeyword_block, NS_MATHML_DISPLAYSTYLE_BLOCK, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kContextOpacityKTable[] = { michael@0: eCSSKeyword_context_fill_opacity, NS_STYLE_CONTEXT_FILL_OPACITY, michael@0: eCSSKeyword_context_stroke_opacity, NS_STYLE_CONTEXT_STROKE_OPACITY, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kContextPatternKTable[] = { michael@0: eCSSKeyword_context_fill, NS_COLOR_CONTEXT_FILL, michael@0: eCSSKeyword_context_stroke, NS_COLOR_CONTEXT_STROKE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kOrientKTable[] = { michael@0: eCSSKeyword_horizontal, NS_STYLE_ORIENT_HORIZONTAL, michael@0: eCSSKeyword_vertical, NS_STYLE_ORIENT_VERTICAL, michael@0: eCSSKeyword_auto, NS_STYLE_ORIENT_AUTO, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: // Same as kBorderStyleKTable except 'hidden'. michael@0: const KTableValue nsCSSProps::kOutlineStyleKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_BORDER_STYLE_NONE, michael@0: eCSSKeyword_auto, NS_STYLE_BORDER_STYLE_AUTO, michael@0: eCSSKeyword_dotted, NS_STYLE_BORDER_STYLE_DOTTED, michael@0: eCSSKeyword_dashed, NS_STYLE_BORDER_STYLE_DASHED, michael@0: eCSSKeyword_solid, NS_STYLE_BORDER_STYLE_SOLID, michael@0: eCSSKeyword_double, NS_STYLE_BORDER_STYLE_DOUBLE, michael@0: eCSSKeyword_groove, NS_STYLE_BORDER_STYLE_GROOVE, michael@0: eCSSKeyword_ridge, NS_STYLE_BORDER_STYLE_RIDGE, michael@0: eCSSKeyword_inset, NS_STYLE_BORDER_STYLE_INSET, michael@0: eCSSKeyword_outset, NS_STYLE_BORDER_STYLE_OUTSET, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kOutlineColorKTable[] = { michael@0: eCSSKeyword__moz_use_text_color, NS_STYLE_COLOR_MOZ_USE_TEXT_COLOR, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kOverflowKTable[] = { michael@0: eCSSKeyword_auto, NS_STYLE_OVERFLOW_AUTO, michael@0: eCSSKeyword_visible, NS_STYLE_OVERFLOW_VISIBLE, michael@0: eCSSKeyword_hidden, NS_STYLE_OVERFLOW_HIDDEN, michael@0: eCSSKeyword_scroll, NS_STYLE_OVERFLOW_SCROLL, michael@0: // Deprecated: michael@0: eCSSKeyword__moz_scrollbars_none, NS_STYLE_OVERFLOW_HIDDEN, michael@0: eCSSKeyword__moz_scrollbars_horizontal, NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL, michael@0: eCSSKeyword__moz_scrollbars_vertical, NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL, michael@0: eCSSKeyword__moz_hidden_unscrollable, NS_STYLE_OVERFLOW_CLIP, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kOverflowClipBoxKTable[] = { michael@0: eCSSKeyword_padding_box, NS_STYLE_OVERFLOW_CLIP_BOX_PADDING_BOX, michael@0: eCSSKeyword_content_box, NS_STYLE_OVERFLOW_CLIP_BOX_CONTENT_BOX, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kOverflowSubKTable[] = { michael@0: eCSSKeyword_auto, NS_STYLE_OVERFLOW_AUTO, michael@0: eCSSKeyword_visible, NS_STYLE_OVERFLOW_VISIBLE, michael@0: eCSSKeyword_hidden, NS_STYLE_OVERFLOW_HIDDEN, michael@0: eCSSKeyword_scroll, NS_STYLE_OVERFLOW_SCROLL, michael@0: // Deprecated: michael@0: eCSSKeyword__moz_hidden_unscrollable, NS_STYLE_OVERFLOW_CLIP, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kPageBreakKTable[] = { michael@0: eCSSKeyword_auto, NS_STYLE_PAGE_BREAK_AUTO, michael@0: eCSSKeyword_always, NS_STYLE_PAGE_BREAK_ALWAYS, michael@0: eCSSKeyword_avoid, NS_STYLE_PAGE_BREAK_AVOID, michael@0: eCSSKeyword_left, NS_STYLE_PAGE_BREAK_LEFT, michael@0: eCSSKeyword_right, NS_STYLE_PAGE_BREAK_RIGHT, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kPageBreakInsideKTable[] = { michael@0: eCSSKeyword_auto, NS_STYLE_PAGE_BREAK_AUTO, michael@0: eCSSKeyword_avoid, NS_STYLE_PAGE_BREAK_AVOID, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kPageMarksKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_PAGE_MARKS_NONE, michael@0: eCSSKeyword_crop, NS_STYLE_PAGE_MARKS_CROP, michael@0: eCSSKeyword_cross, NS_STYLE_PAGE_MARKS_REGISTER, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kPageSizeKTable[] = { michael@0: eCSSKeyword_landscape, NS_STYLE_PAGE_SIZE_LANDSCAPE, michael@0: eCSSKeyword_portrait, NS_STYLE_PAGE_SIZE_PORTRAIT, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kPointerEventsKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_POINTER_EVENTS_NONE, michael@0: eCSSKeyword_visiblepainted, NS_STYLE_POINTER_EVENTS_VISIBLEPAINTED, michael@0: eCSSKeyword_visiblefill, NS_STYLE_POINTER_EVENTS_VISIBLEFILL, michael@0: eCSSKeyword_visiblestroke, NS_STYLE_POINTER_EVENTS_VISIBLESTROKE, michael@0: eCSSKeyword_visible, NS_STYLE_POINTER_EVENTS_VISIBLE, michael@0: eCSSKeyword_painted, NS_STYLE_POINTER_EVENTS_PAINTED, michael@0: eCSSKeyword_fill, NS_STYLE_POINTER_EVENTS_FILL, michael@0: eCSSKeyword_stroke, NS_STYLE_POINTER_EVENTS_STROKE, michael@0: eCSSKeyword_all, NS_STYLE_POINTER_EVENTS_ALL, michael@0: eCSSKeyword_auto, NS_STYLE_POINTER_EVENTS_AUTO, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: KTableValue nsCSSProps::kPositionKTable[] = { michael@0: eCSSKeyword_static, NS_STYLE_POSITION_STATIC, michael@0: eCSSKeyword_relative, NS_STYLE_POSITION_RELATIVE, michael@0: eCSSKeyword_absolute, NS_STYLE_POSITION_ABSOLUTE, michael@0: eCSSKeyword_fixed, NS_STYLE_POSITION_FIXED, michael@0: // The next entry is controlled by the layout.css.sticky.enabled pref. michael@0: eCSSKeyword_sticky, NS_STYLE_POSITION_STICKY, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kRadialGradientShapeKTable[] = { michael@0: eCSSKeyword_circle, NS_STYLE_GRADIENT_SHAPE_CIRCULAR, michael@0: eCSSKeyword_ellipse, NS_STYLE_GRADIENT_SHAPE_ELLIPTICAL, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kRadialGradientSizeKTable[] = { michael@0: eCSSKeyword_closest_side, NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE, michael@0: eCSSKeyword_closest_corner, NS_STYLE_GRADIENT_SIZE_CLOSEST_CORNER, michael@0: eCSSKeyword_farthest_side, NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE, michael@0: eCSSKeyword_farthest_corner, NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kRadialGradientLegacySizeKTable[] = { michael@0: eCSSKeyword_closest_side, NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE, michael@0: eCSSKeyword_closest_corner, NS_STYLE_GRADIENT_SIZE_CLOSEST_CORNER, michael@0: eCSSKeyword_farthest_side, NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE, michael@0: eCSSKeyword_farthest_corner, NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER, michael@0: // synonyms michael@0: eCSSKeyword_contain, NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE, michael@0: eCSSKeyword_cover, NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kResizeKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_RESIZE_NONE, michael@0: eCSSKeyword_both, NS_STYLE_RESIZE_BOTH, michael@0: eCSSKeyword_horizontal, NS_STYLE_RESIZE_HORIZONTAL, michael@0: eCSSKeyword_vertical, NS_STYLE_RESIZE_VERTICAL, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kStackSizingKTable[] = { michael@0: eCSSKeyword_ignore, NS_STYLE_STACK_SIZING_IGNORE, michael@0: eCSSKeyword_stretch_to_fit, NS_STYLE_STACK_SIZING_STRETCH_TO_FIT, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kTableLayoutKTable[] = { michael@0: eCSSKeyword_auto, NS_STYLE_TABLE_LAYOUT_AUTO, michael@0: eCSSKeyword_fixed, NS_STYLE_TABLE_LAYOUT_FIXED, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: KTableValue nsCSSProps::kTextAlignKTable[] = { michael@0: eCSSKeyword_left, NS_STYLE_TEXT_ALIGN_LEFT, michael@0: eCSSKeyword_right, NS_STYLE_TEXT_ALIGN_RIGHT, michael@0: eCSSKeyword_center, NS_STYLE_TEXT_ALIGN_CENTER, michael@0: eCSSKeyword_justify, NS_STYLE_TEXT_ALIGN_JUSTIFY, michael@0: eCSSKeyword__moz_center, NS_STYLE_TEXT_ALIGN_MOZ_CENTER, michael@0: eCSSKeyword__moz_right, NS_STYLE_TEXT_ALIGN_MOZ_RIGHT, michael@0: eCSSKeyword__moz_left, NS_STYLE_TEXT_ALIGN_MOZ_LEFT, michael@0: eCSSKeyword_start, NS_STYLE_TEXT_ALIGN_DEFAULT, michael@0: eCSSKeyword_end, NS_STYLE_TEXT_ALIGN_END, michael@0: eCSSKeyword_true, NS_STYLE_TEXT_ALIGN_TRUE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: KTableValue nsCSSProps::kTextAlignLastKTable[] = { michael@0: eCSSKeyword_auto, NS_STYLE_TEXT_ALIGN_AUTO, michael@0: eCSSKeyword_left, NS_STYLE_TEXT_ALIGN_LEFT, michael@0: eCSSKeyword_right, NS_STYLE_TEXT_ALIGN_RIGHT, michael@0: eCSSKeyword_center, NS_STYLE_TEXT_ALIGN_CENTER, michael@0: eCSSKeyword_justify, NS_STYLE_TEXT_ALIGN_JUSTIFY, michael@0: eCSSKeyword_start, NS_STYLE_TEXT_ALIGN_DEFAULT, michael@0: eCSSKeyword_end, NS_STYLE_TEXT_ALIGN_END, michael@0: eCSSKeyword_true, NS_STYLE_TEXT_ALIGN_TRUE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kTextCombineUprightKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_TEXT_COMBINE_UPRIGHT_NONE, michael@0: eCSSKeyword_all, NS_STYLE_TEXT_COMBINE_UPRIGHT_ALL, michael@0: eCSSKeyword_digits, NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_2, // w/o number ==> 2 michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kTextDecorationLineKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_TEXT_DECORATION_LINE_NONE, michael@0: eCSSKeyword_underline, NS_STYLE_TEXT_DECORATION_LINE_UNDERLINE, michael@0: eCSSKeyword_overline, NS_STYLE_TEXT_DECORATION_LINE_OVERLINE, michael@0: eCSSKeyword_line_through, NS_STYLE_TEXT_DECORATION_LINE_LINE_THROUGH, michael@0: eCSSKeyword_blink, NS_STYLE_TEXT_DECORATION_LINE_BLINK, michael@0: eCSSKeyword__moz_anchor_decoration, NS_STYLE_TEXT_DECORATION_LINE_PREF_ANCHORS, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kTextDecorationStyleKTable[] = { michael@0: eCSSKeyword__moz_none, NS_STYLE_TEXT_DECORATION_STYLE_NONE, michael@0: eCSSKeyword_solid, NS_STYLE_TEXT_DECORATION_STYLE_SOLID, michael@0: eCSSKeyword_double, NS_STYLE_TEXT_DECORATION_STYLE_DOUBLE, michael@0: eCSSKeyword_dotted, NS_STYLE_TEXT_DECORATION_STYLE_DOTTED, michael@0: eCSSKeyword_dashed, NS_STYLE_TEXT_DECORATION_STYLE_DASHED, michael@0: eCSSKeyword_wavy, NS_STYLE_TEXT_DECORATION_STYLE_WAVY, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kTextOrientationKTable[] = { michael@0: eCSSKeyword_auto, NS_STYLE_TEXT_ORIENTATION_AUTO, michael@0: eCSSKeyword_upright, NS_STYLE_TEXT_ORIENTATION_UPRIGHT, michael@0: eCSSKeyword_sideways, NS_STYLE_TEXT_ORIENTATION_SIDEWAYS, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kTextOverflowKTable[] = { michael@0: eCSSKeyword_clip, NS_STYLE_TEXT_OVERFLOW_CLIP, michael@0: eCSSKeyword_ellipsis, NS_STYLE_TEXT_OVERFLOW_ELLIPSIS, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kTextTransformKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_TEXT_TRANSFORM_NONE, michael@0: eCSSKeyword_capitalize, NS_STYLE_TEXT_TRANSFORM_CAPITALIZE, michael@0: eCSSKeyword_lowercase, NS_STYLE_TEXT_TRANSFORM_LOWERCASE, michael@0: eCSSKeyword_uppercase, NS_STYLE_TEXT_TRANSFORM_UPPERCASE, michael@0: eCSSKeyword_full_width, NS_STYLE_TEXT_TRANSFORM_FULLWIDTH, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kTouchActionKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_TOUCH_ACTION_NONE, michael@0: eCSSKeyword_auto, NS_STYLE_TOUCH_ACTION_AUTO, michael@0: eCSSKeyword_pan_x, NS_STYLE_TOUCH_ACTION_PAN_X, michael@0: eCSSKeyword_pan_y, NS_STYLE_TOUCH_ACTION_PAN_Y, michael@0: eCSSKeyword_manipulation, NS_STYLE_TOUCH_ACTION_MANIPULATION, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kTransitionTimingFunctionKTable[] = { michael@0: eCSSKeyword_ease, NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE, michael@0: eCSSKeyword_linear, NS_STYLE_TRANSITION_TIMING_FUNCTION_LINEAR, michael@0: eCSSKeyword_ease_in, NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_IN, michael@0: eCSSKeyword_ease_out, NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_OUT, michael@0: eCSSKeyword_ease_in_out, NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_IN_OUT, michael@0: eCSSKeyword_step_start, NS_STYLE_TRANSITION_TIMING_FUNCTION_STEP_START, michael@0: eCSSKeyword_step_end, NS_STYLE_TRANSITION_TIMING_FUNCTION_STEP_END, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kUnicodeBidiKTable[] = { michael@0: eCSSKeyword_normal, NS_STYLE_UNICODE_BIDI_NORMAL, michael@0: eCSSKeyword_embed, NS_STYLE_UNICODE_BIDI_EMBED, michael@0: eCSSKeyword_bidi_override, NS_STYLE_UNICODE_BIDI_OVERRIDE, michael@0: eCSSKeyword__moz_isolate, NS_STYLE_UNICODE_BIDI_ISOLATE, michael@0: eCSSKeyword__moz_isolate_override, NS_STYLE_UNICODE_BIDI_ISOLATE_OVERRIDE, michael@0: eCSSKeyword__moz_plaintext, NS_STYLE_UNICODE_BIDI_PLAINTEXT, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kUserFocusKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_USER_FOCUS_NONE, michael@0: eCSSKeyword_normal, NS_STYLE_USER_FOCUS_NORMAL, michael@0: eCSSKeyword_ignore, NS_STYLE_USER_FOCUS_IGNORE, michael@0: eCSSKeyword_select_all, NS_STYLE_USER_FOCUS_SELECT_ALL, michael@0: eCSSKeyword_select_before, NS_STYLE_USER_FOCUS_SELECT_BEFORE, michael@0: eCSSKeyword_select_after, NS_STYLE_USER_FOCUS_SELECT_AFTER, michael@0: eCSSKeyword_select_same, NS_STYLE_USER_FOCUS_SELECT_SAME, michael@0: eCSSKeyword_select_menu, NS_STYLE_USER_FOCUS_SELECT_MENU, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kUserInputKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_USER_INPUT_NONE, michael@0: eCSSKeyword_auto, NS_STYLE_USER_INPUT_AUTO, michael@0: eCSSKeyword_enabled, NS_STYLE_USER_INPUT_ENABLED, michael@0: eCSSKeyword_disabled, NS_STYLE_USER_INPUT_DISABLED, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kUserModifyKTable[] = { michael@0: eCSSKeyword_read_only, NS_STYLE_USER_MODIFY_READ_ONLY, michael@0: eCSSKeyword_read_write, NS_STYLE_USER_MODIFY_READ_WRITE, michael@0: eCSSKeyword_write_only, NS_STYLE_USER_MODIFY_WRITE_ONLY, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kUserSelectKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_USER_SELECT_NONE, michael@0: eCSSKeyword_auto, NS_STYLE_USER_SELECT_AUTO, michael@0: eCSSKeyword_text, NS_STYLE_USER_SELECT_TEXT, michael@0: eCSSKeyword_element, NS_STYLE_USER_SELECT_ELEMENT, michael@0: eCSSKeyword_elements, NS_STYLE_USER_SELECT_ELEMENTS, michael@0: eCSSKeyword_all, NS_STYLE_USER_SELECT_ALL, michael@0: eCSSKeyword_toggle, NS_STYLE_USER_SELECT_TOGGLE, michael@0: eCSSKeyword_tri_state, NS_STYLE_USER_SELECT_TRI_STATE, michael@0: eCSSKeyword__moz_all, NS_STYLE_USER_SELECT_MOZ_ALL, michael@0: eCSSKeyword__moz_none, NS_STYLE_USER_SELECT_NONE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kVerticalAlignKTable[] = { michael@0: eCSSKeyword_baseline, NS_STYLE_VERTICAL_ALIGN_BASELINE, michael@0: eCSSKeyword_sub, NS_STYLE_VERTICAL_ALIGN_SUB, michael@0: eCSSKeyword_super, NS_STYLE_VERTICAL_ALIGN_SUPER, michael@0: eCSSKeyword_top, NS_STYLE_VERTICAL_ALIGN_TOP, michael@0: eCSSKeyword_text_top, NS_STYLE_VERTICAL_ALIGN_TEXT_TOP, michael@0: eCSSKeyword_middle, NS_STYLE_VERTICAL_ALIGN_MIDDLE, michael@0: eCSSKeyword__moz_middle_with_baseline, NS_STYLE_VERTICAL_ALIGN_MIDDLE_WITH_BASELINE, michael@0: eCSSKeyword_bottom, NS_STYLE_VERTICAL_ALIGN_BOTTOM, michael@0: eCSSKeyword_text_bottom, NS_STYLE_VERTICAL_ALIGN_TEXT_BOTTOM, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kVisibilityKTable[] = { michael@0: eCSSKeyword_visible, NS_STYLE_VISIBILITY_VISIBLE, michael@0: eCSSKeyword_hidden, NS_STYLE_VISIBILITY_HIDDEN, michael@0: eCSSKeyword_collapse, NS_STYLE_VISIBILITY_COLLAPSE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kWhitespaceKTable[] = { michael@0: eCSSKeyword_normal, NS_STYLE_WHITESPACE_NORMAL, michael@0: eCSSKeyword_pre, NS_STYLE_WHITESPACE_PRE, michael@0: eCSSKeyword_nowrap, NS_STYLE_WHITESPACE_NOWRAP, michael@0: eCSSKeyword_pre_wrap, NS_STYLE_WHITESPACE_PRE_WRAP, michael@0: eCSSKeyword_pre_line, NS_STYLE_WHITESPACE_PRE_LINE, michael@0: eCSSKeyword__moz_pre_discard_newlines, NS_STYLE_WHITESPACE_PRE_DISCARD_NEWLINES, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kWidthKTable[] = { michael@0: eCSSKeyword__moz_max_content, NS_STYLE_WIDTH_MAX_CONTENT, michael@0: eCSSKeyword__moz_min_content, NS_STYLE_WIDTH_MIN_CONTENT, michael@0: eCSSKeyword__moz_fit_content, NS_STYLE_WIDTH_FIT_CONTENT, michael@0: eCSSKeyword__moz_available, NS_STYLE_WIDTH_AVAILABLE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kWindowShadowKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_WINDOW_SHADOW_NONE, michael@0: eCSSKeyword_default, NS_STYLE_WINDOW_SHADOW_DEFAULT, michael@0: eCSSKeyword_menu, NS_STYLE_WINDOW_SHADOW_MENU, michael@0: eCSSKeyword_tooltip, NS_STYLE_WINDOW_SHADOW_TOOLTIP, michael@0: eCSSKeyword_sheet, NS_STYLE_WINDOW_SHADOW_SHEET, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kWordBreakKTable[] = { michael@0: eCSSKeyword_normal, NS_STYLE_WORDBREAK_NORMAL, michael@0: eCSSKeyword_break_all, NS_STYLE_WORDBREAK_BREAK_ALL, michael@0: eCSSKeyword_keep_all, NS_STYLE_WORDBREAK_KEEP_ALL, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kWordWrapKTable[] = { michael@0: eCSSKeyword_normal, NS_STYLE_WORDWRAP_NORMAL, michael@0: eCSSKeyword_break_word, NS_STYLE_WORDWRAP_BREAK_WORD, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kWritingModeKTable[] = { michael@0: eCSSKeyword_horizontal_tb, NS_STYLE_WRITING_MODE_HORIZONTAL_TB, michael@0: eCSSKeyword_vertical_lr, NS_STYLE_WRITING_MODE_VERTICAL_LR, michael@0: eCSSKeyword_vertical_rl, NS_STYLE_WRITING_MODE_VERTICAL_RL, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kHyphensKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_HYPHENS_NONE, michael@0: eCSSKeyword_manual, NS_STYLE_HYPHENS_MANUAL, michael@0: eCSSKeyword_auto, NS_STYLE_HYPHENS_AUTO, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: // Specific keyword tables for XUL.properties michael@0: const KTableValue nsCSSProps::kBoxAlignKTable[] = { michael@0: eCSSKeyword_stretch, NS_STYLE_BOX_ALIGN_STRETCH, michael@0: eCSSKeyword_start, NS_STYLE_BOX_ALIGN_START, michael@0: eCSSKeyword_center, NS_STYLE_BOX_ALIGN_CENTER, michael@0: eCSSKeyword_baseline, NS_STYLE_BOX_ALIGN_BASELINE, michael@0: eCSSKeyword_end, NS_STYLE_BOX_ALIGN_END, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBoxDirectionKTable[] = { michael@0: eCSSKeyword_normal, NS_STYLE_BOX_DIRECTION_NORMAL, michael@0: eCSSKeyword_reverse, NS_STYLE_BOX_DIRECTION_REVERSE, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBoxOrientKTable[] = { michael@0: eCSSKeyword_horizontal, NS_STYLE_BOX_ORIENT_HORIZONTAL, michael@0: eCSSKeyword_vertical, NS_STYLE_BOX_ORIENT_VERTICAL, michael@0: eCSSKeyword_inline_axis, NS_STYLE_BOX_ORIENT_HORIZONTAL, michael@0: eCSSKeyword_block_axis, NS_STYLE_BOX_ORIENT_VERTICAL, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kBoxPackKTable[] = { michael@0: eCSSKeyword_start, NS_STYLE_BOX_PACK_START, michael@0: eCSSKeyword_center, NS_STYLE_BOX_PACK_CENTER, michael@0: eCSSKeyword_end, NS_STYLE_BOX_PACK_END, michael@0: eCSSKeyword_justify, NS_STYLE_BOX_PACK_JUSTIFY, michael@0: eCSSKeyword_UNKNOWN,-1 michael@0: }; michael@0: michael@0: // keyword tables for SVG properties michael@0: michael@0: const KTableValue nsCSSProps::kDominantBaselineKTable[] = { michael@0: eCSSKeyword_auto, NS_STYLE_DOMINANT_BASELINE_AUTO, michael@0: eCSSKeyword_use_script, NS_STYLE_DOMINANT_BASELINE_USE_SCRIPT, michael@0: eCSSKeyword_no_change, NS_STYLE_DOMINANT_BASELINE_NO_CHANGE, michael@0: eCSSKeyword_reset_size, NS_STYLE_DOMINANT_BASELINE_RESET_SIZE, michael@0: eCSSKeyword_alphabetic, NS_STYLE_DOMINANT_BASELINE_ALPHABETIC, michael@0: eCSSKeyword_hanging, NS_STYLE_DOMINANT_BASELINE_HANGING, michael@0: eCSSKeyword_ideographic, NS_STYLE_DOMINANT_BASELINE_IDEOGRAPHIC, michael@0: eCSSKeyword_mathematical, NS_STYLE_DOMINANT_BASELINE_MATHEMATICAL, michael@0: eCSSKeyword_central, NS_STYLE_DOMINANT_BASELINE_CENTRAL, michael@0: eCSSKeyword_middle, NS_STYLE_DOMINANT_BASELINE_MIDDLE, michael@0: eCSSKeyword_text_after_edge, NS_STYLE_DOMINANT_BASELINE_TEXT_AFTER_EDGE, michael@0: eCSSKeyword_text_before_edge, NS_STYLE_DOMINANT_BASELINE_TEXT_BEFORE_EDGE, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFillRuleKTable[] = { michael@0: eCSSKeyword_nonzero, NS_STYLE_FILL_RULE_NONZERO, michael@0: eCSSKeyword_evenodd, NS_STYLE_FILL_RULE_EVENODD, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kFilterFunctionKTable[] = { michael@0: eCSSKeyword_blur, NS_STYLE_FILTER_BLUR, michael@0: eCSSKeyword_brightness, NS_STYLE_FILTER_BRIGHTNESS, michael@0: eCSSKeyword_contrast, NS_STYLE_FILTER_CONTRAST, michael@0: eCSSKeyword_grayscale, NS_STYLE_FILTER_GRAYSCALE, michael@0: eCSSKeyword_invert, NS_STYLE_FILTER_INVERT, michael@0: eCSSKeyword_opacity, NS_STYLE_FILTER_OPACITY, michael@0: eCSSKeyword_saturate, NS_STYLE_FILTER_SATURATE, michael@0: eCSSKeyword_sepia, NS_STYLE_FILTER_SEPIA, michael@0: eCSSKeyword_hue_rotate, NS_STYLE_FILTER_HUE_ROTATE, michael@0: eCSSKeyword_drop_shadow, NS_STYLE_FILTER_DROP_SHADOW, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kImageRenderingKTable[] = { michael@0: eCSSKeyword_auto, NS_STYLE_IMAGE_RENDERING_AUTO, michael@0: eCSSKeyword_optimizespeed, NS_STYLE_IMAGE_RENDERING_OPTIMIZESPEED, michael@0: eCSSKeyword_optimizequality, NS_STYLE_IMAGE_RENDERING_OPTIMIZEQUALITY, michael@0: eCSSKeyword__moz_crisp_edges, NS_STYLE_IMAGE_RENDERING_CRISPEDGES, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kMaskTypeKTable[] = { michael@0: eCSSKeyword_luminance, NS_STYLE_MASK_TYPE_LUMINANCE, michael@0: eCSSKeyword_alpha, NS_STYLE_MASK_TYPE_ALPHA, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kShapeRenderingKTable[] = { michael@0: eCSSKeyword_auto, NS_STYLE_SHAPE_RENDERING_AUTO, michael@0: eCSSKeyword_optimizespeed, NS_STYLE_SHAPE_RENDERING_OPTIMIZESPEED, michael@0: eCSSKeyword_crispedges, NS_STYLE_SHAPE_RENDERING_CRISPEDGES, michael@0: eCSSKeyword_geometricprecision, NS_STYLE_SHAPE_RENDERING_GEOMETRICPRECISION, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kStrokeLinecapKTable[] = { michael@0: eCSSKeyword_butt, NS_STYLE_STROKE_LINECAP_BUTT, michael@0: eCSSKeyword_round, NS_STYLE_STROKE_LINECAP_ROUND, michael@0: eCSSKeyword_square, NS_STYLE_STROKE_LINECAP_SQUARE, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kStrokeLinejoinKTable[] = { michael@0: eCSSKeyword_miter, NS_STYLE_STROKE_LINEJOIN_MITER, michael@0: eCSSKeyword_round, NS_STYLE_STROKE_LINEJOIN_ROUND, michael@0: eCSSKeyword_bevel, NS_STYLE_STROKE_LINEJOIN_BEVEL, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: // Lookup table to store the sole objectValue keyword to let SVG glyphs inherit michael@0: // certain stroke-* properties from the outer text object michael@0: const KTableValue nsCSSProps::kStrokeContextValueKTable[] = { michael@0: eCSSKeyword_context_value, NS_STYLE_STROKE_PROP_CONTEXT_VALUE, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kTextAnchorKTable[] = { michael@0: eCSSKeyword_start, NS_STYLE_TEXT_ANCHOR_START, michael@0: eCSSKeyword_middle, NS_STYLE_TEXT_ANCHOR_MIDDLE, michael@0: eCSSKeyword_end, NS_STYLE_TEXT_ANCHOR_END, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kTextRenderingKTable[] = { michael@0: eCSSKeyword_auto, NS_STYLE_TEXT_RENDERING_AUTO, michael@0: eCSSKeyword_optimizespeed, NS_STYLE_TEXT_RENDERING_OPTIMIZESPEED, michael@0: eCSSKeyword_optimizelegibility, NS_STYLE_TEXT_RENDERING_OPTIMIZELEGIBILITY, michael@0: eCSSKeyword_geometricprecision, NS_STYLE_TEXT_RENDERING_GEOMETRICPRECISION, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kVectorEffectKTable[] = { michael@0: eCSSKeyword_none, NS_STYLE_VECTOR_EFFECT_NONE, michael@0: eCSSKeyword_non_scaling_stroke, NS_STYLE_VECTOR_EFFECT_NON_SCALING_STROKE, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kColorInterpolationKTable[] = { michael@0: eCSSKeyword_auto, NS_STYLE_COLOR_INTERPOLATION_AUTO, michael@0: eCSSKeyword_srgb, NS_STYLE_COLOR_INTERPOLATION_SRGB, michael@0: eCSSKeyword_linearrgb, NS_STYLE_COLOR_INTERPOLATION_LINEARRGB, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: const KTableValue nsCSSProps::kColumnFillKTable[] = { michael@0: eCSSKeyword_auto, NS_STYLE_COLUMN_FILL_AUTO, michael@0: eCSSKeyword_balance, NS_STYLE_COLUMN_FILL_BALANCE, michael@0: eCSSKeyword_UNKNOWN, -1 michael@0: }; michael@0: michael@0: static bool IsKeyValSentinel(nsCSSKeyword aKey, KTableValue aValue) michael@0: { michael@0: return aKey == eCSSKeyword_UNKNOWN && aValue == -1; michael@0: } michael@0: michael@0: int32_t michael@0: nsCSSProps::FindIndexOfKeyword(nsCSSKeyword aKeyword, michael@0: const KTableValue aTable[]) michael@0: { michael@0: if (eCSSKeyword_UNKNOWN == aKeyword) { michael@0: // NOTE: we can have keyword tables where eCSSKeyword_UNKNOWN is used michael@0: // not only for the sentinel, but also in the middle of the table to michael@0: // knock out values that have been disabled by prefs, e.g. kDisplayKTable. michael@0: // So we deal with eCSSKeyword_UNKNOWN up front to avoid returning a valid michael@0: // index in the loop below. michael@0: return -1; michael@0: } michael@0: int32_t i = 0; michael@0: for (;;) { michael@0: nsCSSKeyword key = nsCSSKeyword(aTable[i]); michael@0: int32_t val = aTable[i + 1]; michael@0: if (::IsKeyValSentinel(key, val)) { michael@0: break; michael@0: } michael@0: if (aKeyword == key) { michael@0: return i; michael@0: } michael@0: i += 2; michael@0: } michael@0: return -1; michael@0: } michael@0: michael@0: bool michael@0: nsCSSProps::FindKeyword(nsCSSKeyword aKeyword, const KTableValue aTable[], michael@0: int32_t& aResult) michael@0: { michael@0: int32_t index = FindIndexOfKeyword(aKeyword, aTable); michael@0: if (index >= 0) { michael@0: aResult = aTable[index + 1]; michael@0: return true; michael@0: } michael@0: return false; michael@0: } michael@0: michael@0: nsCSSKeyword michael@0: nsCSSProps::ValueToKeywordEnum(int32_t aValue, const KTableValue aTable[]) michael@0: { michael@0: NS_ASSERTION(KTableValue(aValue) == aValue, "Value out of range"); michael@0: int32_t i = 1; michael@0: for (;;) { michael@0: int32_t val = aTable[i]; michael@0: nsCSSKeyword key = nsCSSKeyword(aTable[i - 1]); michael@0: if (::IsKeyValSentinel(key, val)) { michael@0: break; michael@0: } michael@0: if (aValue == val) { michael@0: return key; michael@0: } michael@0: i += 2; michael@0: } michael@0: return eCSSKeyword_UNKNOWN; michael@0: } michael@0: michael@0: const nsAFlatCString& michael@0: nsCSSProps::ValueToKeyword(int32_t aValue, const KTableValue aTable[]) michael@0: { michael@0: NS_ASSERTION(KTableValue(aValue) == aValue, "Value out of range"); michael@0: nsCSSKeyword keyword = ValueToKeywordEnum(aValue, aTable); michael@0: if (keyword == eCSSKeyword_UNKNOWN) { michael@0: static nsDependentCString sNullStr(""); michael@0: return sNullStr; michael@0: } else { michael@0: return nsCSSKeywords::GetStringValue(keyword); michael@0: } michael@0: } michael@0: michael@0: /* static */ const KTableValue* const michael@0: nsCSSProps::kKeywordTableTable[eCSSProperty_COUNT_no_shorthands] = { michael@0: #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \ michael@0: kwtable_, stylestruct_, stylestructoffset_, animtype_) \ michael@0: kwtable_, michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP michael@0: }; michael@0: michael@0: const nsAFlatCString& michael@0: nsCSSProps::LookupPropertyValue(nsCSSProperty aProp, int32_t aValue) michael@0: { michael@0: NS_ABORT_IF_FALSE(aProp >= 0 && aProp < eCSSProperty_COUNT, michael@0: "property out of range"); michael@0: NS_ASSERTION(KTableValue(aValue) == aValue, "Value out of range"); michael@0: michael@0: const KTableValue* kwtable = nullptr; michael@0: if (aProp < eCSSProperty_COUNT_no_shorthands) michael@0: kwtable = kKeywordTableTable[aProp]; michael@0: michael@0: if (kwtable) michael@0: return ValueToKeyword(aValue, kwtable); michael@0: michael@0: static nsDependentCString sNullStr(""); michael@0: return sNullStr; michael@0: } michael@0: michael@0: bool nsCSSProps::GetColorName(int32_t aPropValue, nsCString &aStr) michael@0: { michael@0: bool rv = false; michael@0: michael@0: // first get the keyword corresponding to the property Value from the color table michael@0: nsCSSKeyword keyword = ValueToKeywordEnum(aPropValue, kColorKTable); michael@0: michael@0: // next get the name as a string from the keywords table michael@0: if (keyword != eCSSKeyword_UNKNOWN) { michael@0: nsCSSKeywords::AddRefTable(); michael@0: aStr = nsCSSKeywords::GetStringValue(keyword); michael@0: nsCSSKeywords::ReleaseTable(); michael@0: rv = true; michael@0: } michael@0: return rv; michael@0: } michael@0: michael@0: const nsStyleStructID nsCSSProps::kSIDTable[eCSSProperty_COUNT_no_shorthands] = { michael@0: // Note that this uses the special BackendOnly style struct ID michael@0: // (which does need to be valid for storing in the michael@0: // nsCSSCompressedDataBlock::mStyleBits bitfield). michael@0: #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \ michael@0: kwtable_, stylestruct_, stylestructoffset_, animtype_) \ michael@0: eStyleStruct_##stylestruct_, michael@0: michael@0: #include "nsCSSPropList.h" michael@0: michael@0: #undef CSS_PROP michael@0: }; michael@0: michael@0: const nsStyleAnimType michael@0: nsCSSProps::kAnimTypeTable[eCSSProperty_COUNT_no_shorthands] = { michael@0: #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \ michael@0: stylestruct_, stylestructoffset_, animtype_) \ michael@0: animtype_, michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP michael@0: }; michael@0: michael@0: const ptrdiff_t michael@0: nsCSSProps::kStyleStructOffsetTable[eCSSProperty_COUNT_no_shorthands] = { michael@0: #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \ michael@0: stylestruct_, stylestructoffset_, animtype_) \ michael@0: stylestructoffset_, michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP michael@0: }; michael@0: michael@0: const uint32_t nsCSSProps::kFlagsTable[eCSSProperty_COUNT] = { michael@0: #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \ michael@0: stylestruct_, stylestructoffset_, animtype_) \ michael@0: flags_, michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP michael@0: #define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) flags_, michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_SHORTHAND michael@0: }; michael@0: michael@0: static const nsCSSProperty gAllSubpropTable[] = { michael@0: #define CSS_PROP_LIST_ONLY_COMPONENTS_OF_ALL_SHORTHAND michael@0: #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \ michael@0: stylestruct_, stylestructoffset_, animtype_) \ michael@0: eCSSProperty_##id_, michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP michael@0: #undef CSS_PROP_LIST_ONLY_COMPONENTS_OF_ALL_SHORTHAND michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gAnimationSubpropTable[] = { michael@0: eCSSProperty_animation_duration, michael@0: eCSSProperty_animation_timing_function, michael@0: eCSSProperty_animation_delay, michael@0: eCSSProperty_animation_direction, michael@0: eCSSProperty_animation_fill_mode, michael@0: eCSSProperty_animation_iteration_count, michael@0: // List animation-name last so we serialize it last, in case it has michael@0: // a value that conflicts with one of the other properties. (See michael@0: // how Declaration::GetValue serializes 'animation'. michael@0: eCSSProperty_animation_name, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderRadiusSubpropTable[] = { michael@0: // Code relies on these being in topleft-topright-bottomright-bottomleft michael@0: // order. michael@0: eCSSProperty_border_top_left_radius, michael@0: eCSSProperty_border_top_right_radius, michael@0: eCSSProperty_border_bottom_right_radius, michael@0: eCSSProperty_border_bottom_left_radius, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gOutlineRadiusSubpropTable[] = { michael@0: // Code relies on these being in topleft-topright-bottomright-bottomleft michael@0: // order. michael@0: eCSSProperty__moz_outline_radius_topLeft, michael@0: eCSSProperty__moz_outline_radius_topRight, michael@0: eCSSProperty__moz_outline_radius_bottomRight, michael@0: eCSSProperty__moz_outline_radius_bottomLeft, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBackgroundSubpropTable[] = { michael@0: eCSSProperty_background_color, michael@0: eCSSProperty_background_image, michael@0: eCSSProperty_background_repeat, michael@0: eCSSProperty_background_attachment, michael@0: eCSSProperty_background_position, michael@0: eCSSProperty_background_clip, michael@0: eCSSProperty_background_origin, michael@0: eCSSProperty_background_size, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderSubpropTable[] = { michael@0: eCSSProperty_border_top_width, michael@0: eCSSProperty_border_right_width_value, michael@0: eCSSProperty_border_right_width_ltr_source, michael@0: eCSSProperty_border_right_width_rtl_source, michael@0: eCSSProperty_border_bottom_width, michael@0: eCSSProperty_border_left_width_value, michael@0: eCSSProperty_border_left_width_ltr_source, michael@0: eCSSProperty_border_left_width_rtl_source, michael@0: eCSSProperty_border_top_style, michael@0: eCSSProperty_border_right_style_value, michael@0: eCSSProperty_border_right_style_ltr_source, michael@0: eCSSProperty_border_right_style_rtl_source, michael@0: eCSSProperty_border_bottom_style, michael@0: eCSSProperty_border_left_style_value, michael@0: eCSSProperty_border_left_style_ltr_source, michael@0: eCSSProperty_border_left_style_rtl_source, michael@0: eCSSProperty_border_top_color, michael@0: eCSSProperty_border_right_color_value, michael@0: eCSSProperty_border_right_color_ltr_source, michael@0: eCSSProperty_border_right_color_rtl_source, michael@0: eCSSProperty_border_bottom_color, michael@0: eCSSProperty_border_left_color_value, michael@0: eCSSProperty_border_left_color_ltr_source, michael@0: eCSSProperty_border_left_color_rtl_source, michael@0: eCSSProperty_border_top_colors, michael@0: eCSSProperty_border_right_colors, michael@0: eCSSProperty_border_bottom_colors, michael@0: eCSSProperty_border_left_colors, michael@0: eCSSProperty_border_image_source, michael@0: eCSSProperty_border_image_slice, michael@0: eCSSProperty_border_image_width, michael@0: eCSSProperty_border_image_outset, michael@0: eCSSProperty_border_image_repeat, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderBottomSubpropTable[] = { michael@0: // nsCSSDeclaration.cpp outputs the subproperties in this order. michael@0: // It also depends on the color being third. michael@0: eCSSProperty_border_bottom_width, michael@0: eCSSProperty_border_bottom_style, michael@0: eCSSProperty_border_bottom_color, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static_assert(NS_SIDE_TOP == 0 && NS_SIDE_RIGHT == 1 && michael@0: NS_SIDE_BOTTOM == 2 && NS_SIDE_LEFT == 3, michael@0: "box side constants not top/right/bottom/left == 0/1/2/3"); michael@0: static const nsCSSProperty gBorderColorSubpropTable[] = { michael@0: // Code relies on these being in top-right-bottom-left order. michael@0: // Code relies on these matching the NS_SIDE_* constants. michael@0: eCSSProperty_border_top_color, michael@0: eCSSProperty_border_right_color_value, michael@0: eCSSProperty_border_bottom_color, michael@0: eCSSProperty_border_left_color_value, michael@0: // extras: michael@0: eCSSProperty_border_left_color_ltr_source, michael@0: eCSSProperty_border_left_color_rtl_source, michael@0: eCSSProperty_border_right_color_ltr_source, michael@0: eCSSProperty_border_right_color_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderEndColorSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_border_end_color_value, michael@0: eCSSProperty_border_right_color_ltr_source, michael@0: eCSSProperty_border_left_color_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderLeftColorSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_border_left_color_value, michael@0: eCSSProperty_border_left_color_ltr_source, michael@0: eCSSProperty_border_left_color_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderRightColorSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_border_right_color_value, michael@0: eCSSProperty_border_right_color_ltr_source, michael@0: eCSSProperty_border_right_color_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderStartColorSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_border_start_color_value, michael@0: eCSSProperty_border_left_color_ltr_source, michael@0: eCSSProperty_border_right_color_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderEndSubpropTable[] = { michael@0: // nsCSSDeclaration.cpp output the subproperties in this order. michael@0: // It also depends on the color being third. michael@0: eCSSProperty_border_end_width_value, michael@0: eCSSProperty_border_end_style_value, michael@0: eCSSProperty_border_end_color_value, michael@0: // extras: michael@0: eCSSProperty_border_right_width_ltr_source, michael@0: eCSSProperty_border_left_width_rtl_source, michael@0: eCSSProperty_border_right_style_ltr_source, michael@0: eCSSProperty_border_left_style_rtl_source, michael@0: eCSSProperty_border_right_color_ltr_source, michael@0: eCSSProperty_border_left_color_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderLeftSubpropTable[] = { michael@0: // nsCSSDeclaration.cpp outputs the subproperties in this order. michael@0: // It also depends on the color being third. michael@0: eCSSProperty_border_left_width_value, michael@0: eCSSProperty_border_left_style_value, michael@0: eCSSProperty_border_left_color_value, michael@0: // extras: michael@0: eCSSProperty_border_left_width_ltr_source, michael@0: eCSSProperty_border_left_width_rtl_source, michael@0: eCSSProperty_border_left_style_ltr_source, michael@0: eCSSProperty_border_left_style_rtl_source, michael@0: eCSSProperty_border_left_color_ltr_source, michael@0: eCSSProperty_border_left_color_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderRightSubpropTable[] = { michael@0: // nsCSSDeclaration.cpp outputs the subproperties in this order. michael@0: // It also depends on the color being third. michael@0: eCSSProperty_border_right_width_value, michael@0: eCSSProperty_border_right_style_value, michael@0: eCSSProperty_border_right_color_value, michael@0: // extras: michael@0: eCSSProperty_border_right_width_ltr_source, michael@0: eCSSProperty_border_right_width_rtl_source, michael@0: eCSSProperty_border_right_style_ltr_source, michael@0: eCSSProperty_border_right_style_rtl_source, michael@0: eCSSProperty_border_right_color_ltr_source, michael@0: eCSSProperty_border_right_color_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderStartSubpropTable[] = { michael@0: // nsCSSDeclaration.cpp outputs the subproperties in this order. michael@0: // It also depends on the color being third. michael@0: eCSSProperty_border_start_width_value, michael@0: eCSSProperty_border_start_style_value, michael@0: eCSSProperty_border_start_color_value, michael@0: // extras: michael@0: eCSSProperty_border_left_width_ltr_source, michael@0: eCSSProperty_border_right_width_rtl_source, michael@0: eCSSProperty_border_left_style_ltr_source, michael@0: eCSSProperty_border_right_style_rtl_source, michael@0: eCSSProperty_border_left_color_ltr_source, michael@0: eCSSProperty_border_right_color_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderStyleSubpropTable[] = { michael@0: // Code relies on these being in top-right-bottom-left order. michael@0: eCSSProperty_border_top_style, michael@0: eCSSProperty_border_right_style_value, michael@0: eCSSProperty_border_bottom_style, michael@0: eCSSProperty_border_left_style_value, michael@0: // extras: michael@0: eCSSProperty_border_left_style_ltr_source, michael@0: eCSSProperty_border_left_style_rtl_source, michael@0: eCSSProperty_border_right_style_ltr_source, michael@0: eCSSProperty_border_right_style_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderLeftStyleSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_border_left_style_value, michael@0: eCSSProperty_border_left_style_ltr_source, michael@0: eCSSProperty_border_left_style_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderRightStyleSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_border_right_style_value, michael@0: eCSSProperty_border_right_style_ltr_source, michael@0: eCSSProperty_border_right_style_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderStartStyleSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_border_start_style_value, michael@0: eCSSProperty_border_left_style_ltr_source, michael@0: eCSSProperty_border_right_style_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderEndStyleSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_border_end_style_value, michael@0: eCSSProperty_border_right_style_ltr_source, michael@0: eCSSProperty_border_left_style_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderTopSubpropTable[] = { michael@0: // nsCSSDeclaration.cpp outputs the subproperties in this order. michael@0: // It also depends on the color being third. michael@0: eCSSProperty_border_top_width, michael@0: eCSSProperty_border_top_style, michael@0: eCSSProperty_border_top_color, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderWidthSubpropTable[] = { michael@0: // Code relies on these being in top-right-bottom-left order. michael@0: eCSSProperty_border_top_width, michael@0: eCSSProperty_border_right_width_value, michael@0: eCSSProperty_border_bottom_width, michael@0: eCSSProperty_border_left_width_value, michael@0: // extras: michael@0: eCSSProperty_border_left_width_ltr_source, michael@0: eCSSProperty_border_left_width_rtl_source, michael@0: eCSSProperty_border_right_width_ltr_source, michael@0: eCSSProperty_border_right_width_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderLeftWidthSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_border_left_width_value, michael@0: eCSSProperty_border_left_width_ltr_source, michael@0: eCSSProperty_border_left_width_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderRightWidthSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_border_right_width_value, michael@0: eCSSProperty_border_right_width_ltr_source, michael@0: eCSSProperty_border_right_width_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderStartWidthSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_border_start_width_value, michael@0: eCSSProperty_border_left_width_ltr_source, michael@0: eCSSProperty_border_right_width_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderEndWidthSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_border_end_width_value, michael@0: eCSSProperty_border_right_width_ltr_source, michael@0: eCSSProperty_border_left_width_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gFontSubpropTable[] = { michael@0: eCSSProperty_font_family, michael@0: eCSSProperty_font_style, michael@0: eCSSProperty_font_variant, michael@0: eCSSProperty_font_weight, michael@0: eCSSProperty_font_size, michael@0: eCSSProperty_line_height, michael@0: eCSSProperty_font_size_adjust, michael@0: eCSSProperty_font_stretch, michael@0: eCSSProperty__x_system_font, michael@0: eCSSProperty_font_feature_settings, michael@0: eCSSProperty_font_language_override, michael@0: eCSSProperty_font_kerning, michael@0: eCSSProperty_font_synthesis, michael@0: eCSSProperty_font_variant_alternates, michael@0: eCSSProperty_font_variant_caps, michael@0: eCSSProperty_font_variant_east_asian, michael@0: eCSSProperty_font_variant_ligatures, michael@0: eCSSProperty_font_variant_numeric, michael@0: eCSSProperty_font_variant_position, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gListStyleSubpropTable[] = { michael@0: eCSSProperty_list_style_type, michael@0: eCSSProperty_list_style_image, michael@0: eCSSProperty_list_style_position, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gMarginSubpropTable[] = { michael@0: // Code relies on these being in top-right-bottom-left order. michael@0: eCSSProperty_margin_top, michael@0: eCSSProperty_margin_right_value, michael@0: eCSSProperty_margin_bottom, michael@0: eCSSProperty_margin_left_value, michael@0: // extras: michael@0: eCSSProperty_margin_left_ltr_source, michael@0: eCSSProperty_margin_left_rtl_source, michael@0: eCSSProperty_margin_right_ltr_source, michael@0: eCSSProperty_margin_right_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gMarginLeftSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_margin_left_value, michael@0: eCSSProperty_margin_left_ltr_source, michael@0: eCSSProperty_margin_left_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gMarginRightSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_margin_right_value, michael@0: eCSSProperty_margin_right_ltr_source, michael@0: eCSSProperty_margin_right_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gMarginStartSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_margin_start_value, michael@0: eCSSProperty_margin_left_ltr_source, michael@0: eCSSProperty_margin_right_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gMarginEndSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_margin_end_value, michael@0: eCSSProperty_margin_right_ltr_source, michael@0: eCSSProperty_margin_left_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: michael@0: static const nsCSSProperty gOutlineSubpropTable[] = { michael@0: // nsCSSDeclaration.cpp outputs the subproperties in this order. michael@0: // It also depends on the color being third. michael@0: eCSSProperty_outline_width, michael@0: eCSSProperty_outline_style, michael@0: eCSSProperty_outline_color, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gColumnsSubpropTable[] = { michael@0: eCSSProperty__moz_column_count, michael@0: eCSSProperty__moz_column_width, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gColumnRuleSubpropTable[] = { michael@0: // nsCSSDeclaration.cpp outputs the subproperties in this order. michael@0: // It also depends on the color being third. michael@0: eCSSProperty__moz_column_rule_width, michael@0: eCSSProperty__moz_column_rule_style, michael@0: eCSSProperty__moz_column_rule_color, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gFlexSubpropTable[] = { michael@0: eCSSProperty_flex_grow, michael@0: eCSSProperty_flex_shrink, michael@0: eCSSProperty_flex_basis, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gFlexFlowSubpropTable[] = { michael@0: eCSSProperty_flex_direction, michael@0: eCSSProperty_flex_wrap, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gGridTemplateSubpropTable[] = { michael@0: eCSSProperty_grid_template_areas, michael@0: eCSSProperty_grid_template_columns, michael@0: eCSSProperty_grid_template_rows, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gGridSubpropTable[] = { michael@0: eCSSProperty_grid_template_areas, michael@0: eCSSProperty_grid_template_columns, michael@0: eCSSProperty_grid_template_rows, michael@0: eCSSProperty_grid_auto_flow, michael@0: eCSSProperty_grid_auto_columns, michael@0: eCSSProperty_grid_auto_rows, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gGridColumnSubpropTable[] = { michael@0: eCSSProperty_grid_column_start, michael@0: eCSSProperty_grid_column_end, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gGridRowSubpropTable[] = { michael@0: eCSSProperty_grid_row_start, michael@0: eCSSProperty_grid_row_end, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gGridAreaSubpropTable[] = { michael@0: eCSSProperty_grid_row_start, michael@0: eCSSProperty_grid_column_start, michael@0: eCSSProperty_grid_row_end, michael@0: eCSSProperty_grid_column_end, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gOverflowSubpropTable[] = { michael@0: eCSSProperty_overflow_x, michael@0: eCSSProperty_overflow_y, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gPaddingSubpropTable[] = { michael@0: // Code relies on these being in top-right-bottom-left order. michael@0: eCSSProperty_padding_top, michael@0: eCSSProperty_padding_right_value, michael@0: eCSSProperty_padding_bottom, michael@0: eCSSProperty_padding_left_value, michael@0: // extras: michael@0: eCSSProperty_padding_left_ltr_source, michael@0: eCSSProperty_padding_left_rtl_source, michael@0: eCSSProperty_padding_right_ltr_source, michael@0: eCSSProperty_padding_right_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gPaddingLeftSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_padding_left_value, michael@0: eCSSProperty_padding_left_ltr_source, michael@0: eCSSProperty_padding_left_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gPaddingRightSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_padding_right_value, michael@0: eCSSProperty_padding_right_ltr_source, michael@0: eCSSProperty_padding_right_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gPaddingStartSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_padding_start_value, michael@0: eCSSProperty_padding_left_ltr_source, michael@0: eCSSProperty_padding_right_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gPaddingEndSubpropTable[] = { michael@0: // nsCSSParser::ParseDirectionalBoxProperty depends on this order michael@0: eCSSProperty_padding_end_value, michael@0: eCSSProperty_padding_right_ltr_source, michael@0: eCSSProperty_padding_left_rtl_source, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gTextDecorationSubpropTable[] = { michael@0: eCSSProperty_text_decoration_color, michael@0: eCSSProperty_text_decoration_line, michael@0: eCSSProperty_text_decoration_style, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gTransitionSubpropTable[] = { michael@0: eCSSProperty_transition_property, michael@0: eCSSProperty_transition_duration, michael@0: eCSSProperty_transition_timing_function, michael@0: eCSSProperty_transition_delay, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gBorderImageSubpropTable[] = { michael@0: eCSSProperty_border_image_source, michael@0: eCSSProperty_border_image_slice, michael@0: eCSSProperty_border_image_width, michael@0: eCSSProperty_border_image_outset, michael@0: eCSSProperty_border_image_repeat, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: static const nsCSSProperty gMarkerSubpropTable[] = { michael@0: eCSSProperty_marker_start, michael@0: eCSSProperty_marker_mid, michael@0: eCSSProperty_marker_end, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: // Subproperty tables for shorthands that are just aliases with michael@0: // different parsing rules. michael@0: static const nsCSSProperty gMozTransformSubpropTable[] = { michael@0: eCSSProperty_transform, michael@0: eCSSProperty_UNKNOWN michael@0: }; michael@0: michael@0: const nsCSSProperty *const michael@0: nsCSSProps::kSubpropertyTable[eCSSProperty_COUNT - eCSSProperty_COUNT_no_shorthands] = { michael@0: #define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) privatename_ michael@0: // Need an extra level of macro nesting to force expansion of method_ michael@0: // params before they get pasted. michael@0: #define NSCSSPROPS_INNER_MACRO(method_) g##method_##SubpropTable, michael@0: #define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \ michael@0: NSCSSPROPS_INNER_MACRO(method_) michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_SHORTHAND michael@0: #undef NSCSSPROPS_INNER_MACRO michael@0: #undef CSS_PROP_PUBLIC_OR_PRIVATE michael@0: }; michael@0: michael@0: michael@0: #define ENUM_DATA_FOR_PROPERTY(name_, id_, method_, flags_, pref_, \ michael@0: parsevariant_, kwtable_, stylestructoffset_, \ michael@0: animtype_) \ michael@0: ePropertyIndex_for_##id_, michael@0: michael@0: // The order of these enums must match the g*Flags arrays in nsRuleNode.cpp. michael@0: michael@0: enum FontCheckCounter { michael@0: #define CSS_PROP_FONT ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_FONT michael@0: ePropertyCount_for_Font michael@0: }; michael@0: michael@0: enum DisplayCheckCounter { michael@0: #define CSS_PROP_DISPLAY ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_DISPLAY michael@0: ePropertyCount_for_Display michael@0: }; michael@0: michael@0: enum VisibilityCheckCounter { michael@0: #define CSS_PROP_VISIBILITY ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_VISIBILITY michael@0: ePropertyCount_for_Visibility michael@0: }; michael@0: michael@0: enum MarginCheckCounter { michael@0: #define CSS_PROP_MARGIN ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_MARGIN michael@0: ePropertyCount_for_Margin michael@0: }; michael@0: michael@0: enum BorderCheckCounter { michael@0: #define CSS_PROP_BORDER ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_BORDER michael@0: ePropertyCount_for_Border michael@0: }; michael@0: michael@0: enum PaddingCheckCounter { michael@0: #define CSS_PROP_PADDING ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_PADDING michael@0: ePropertyCount_for_Padding michael@0: }; michael@0: michael@0: enum OutlineCheckCounter { michael@0: #define CSS_PROP_OUTLINE ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_OUTLINE michael@0: ePropertyCount_for_Outline michael@0: }; michael@0: michael@0: enum ListCheckCounter { michael@0: #define CSS_PROP_LIST ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_LIST michael@0: ePropertyCount_for_List michael@0: }; michael@0: michael@0: enum ColorCheckCounter { michael@0: #define CSS_PROP_COLOR ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_COLOR michael@0: ePropertyCount_for_Color michael@0: }; michael@0: michael@0: enum BackgroundCheckCounter { michael@0: #define CSS_PROP_BACKGROUND ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_BACKGROUND michael@0: ePropertyCount_for_Background michael@0: }; michael@0: michael@0: enum PositionCheckCounter { michael@0: #define CSS_PROP_POSITION ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_POSITION michael@0: ePropertyCount_for_Position michael@0: }; michael@0: michael@0: enum TableCheckCounter { michael@0: #define CSS_PROP_TABLE ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_TABLE michael@0: ePropertyCount_for_Table michael@0: }; michael@0: michael@0: enum TableBorderCheckCounter { michael@0: #define CSS_PROP_TABLEBORDER ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_TABLEBORDER michael@0: ePropertyCount_for_TableBorder michael@0: }; michael@0: michael@0: enum ContentCheckCounter { michael@0: #define CSS_PROP_CONTENT ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_CONTENT michael@0: ePropertyCount_for_Content michael@0: }; michael@0: michael@0: enum QuotesCheckCounter { michael@0: #define CSS_PROP_QUOTES ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_QUOTES michael@0: ePropertyCount_for_Quotes michael@0: }; michael@0: michael@0: enum TextCheckCounter { michael@0: #define CSS_PROP_TEXT ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_TEXT michael@0: ePropertyCount_for_Text michael@0: }; michael@0: michael@0: enum TextResetCheckCounter { michael@0: #define CSS_PROP_TEXTRESET ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_TEXTRESET michael@0: ePropertyCount_for_TextReset michael@0: }; michael@0: michael@0: enum UserInterfaceCheckCounter { michael@0: #define CSS_PROP_USERINTERFACE ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_USERINTERFACE michael@0: ePropertyCount_for_UserInterface michael@0: }; michael@0: michael@0: enum UIResetCheckCounter { michael@0: #define CSS_PROP_UIRESET ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_UIRESET michael@0: ePropertyCount_for_UIReset michael@0: }; michael@0: michael@0: enum XULCheckCounter { michael@0: #define CSS_PROP_XUL ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_XUL michael@0: ePropertyCount_for_XUL michael@0: }; michael@0: michael@0: enum SVGCheckCounter { michael@0: #define CSS_PROP_SVG ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_SVG michael@0: ePropertyCount_for_SVG michael@0: }; michael@0: michael@0: enum SVGResetCheckCounter { michael@0: #define CSS_PROP_SVGRESET ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_SVGRESET michael@0: ePropertyCount_for_SVGReset michael@0: }; michael@0: michael@0: enum ColumnCheckCounter { michael@0: #define CSS_PROP_COLUMN ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_COLUMN michael@0: ePropertyCount_for_Column michael@0: }; michael@0: michael@0: enum VariablesCheckCounter { michael@0: #define CSS_PROP_VARIABLES ENUM_DATA_FOR_PROPERTY michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_VARIABLES michael@0: ePropertyCount_for_Variables michael@0: }; michael@0: michael@0: #undef ENUM_DATA_FOR_PROPERTY michael@0: michael@0: /* static */ const size_t michael@0: nsCSSProps::gPropertyCountInStruct[nsStyleStructID_Length] = { michael@0: #define STYLE_STRUCT(name, checkdata_cb) \ michael@0: ePropertyCount_for_##name, michael@0: #include "nsStyleStructList.h" michael@0: #undef STYLE_STRUCT michael@0: }; michael@0: michael@0: /* static */ const size_t michael@0: nsCSSProps::gPropertyIndexInStruct[eCSSProperty_COUNT_no_shorthands] = { michael@0: michael@0: #define CSS_PROP_BACKENDONLY(name_, id_, method_, flags_, pref_, \ michael@0: parsevariant_, kwtable_) \ michael@0: size_t(-1), michael@0: #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \ michael@0: kwtable_, stylestruct_, stylestructoffset_, animtype_) \ michael@0: ePropertyIndex_for_##id_, michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP michael@0: #undef CSS_PROP_BACKENDONLY michael@0: michael@0: }; michael@0: michael@0: /* static */ bool michael@0: nsCSSProps::gPropertyEnabled[eCSSProperty_COUNT_with_aliases] = { michael@0: #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \ michael@0: kwtable_, stylestruct_, stylestructoffset_, animtype_) \ michael@0: true, michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP michael@0: michael@0: #define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \ michael@0: true, michael@0: #include "nsCSSPropList.h" michael@0: #undef CSS_PROP_SHORTHAND michael@0: michael@0: #define CSS_PROP_ALIAS(aliasname_, propid_, aliasmethod_, pref_) \ michael@0: true, michael@0: #include "nsCSSPropAliasList.h" michael@0: #undef CSS_PROP_ALIAS michael@0: };