summaryrefslogtreecommitdiff
path: root/xfa/fde/css/fde_cssdatatable.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-11 16:31:27 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-11 21:45:02 +0000
commit96f482c9cd3c99425fd3422251903b1218253c66 (patch)
tree5d089e55f47ab5e46b993026a5f961b44fed04e9 /xfa/fde/css/fde_cssdatatable.cpp
parenta63dd01d2fdda06f96e6188dbc3b415447bf2bc9 (diff)
downloadpdfium-96f482c9cd3c99425fd3422251903b1218253c66.tar.xz
Convert FDE CSS enums to enum classes.
This CL updates the possible FDE CSS enums to enum classes and fixes up any instances of incorrect values being used. A few other cleanups and changes were needed to complete the conversion. Change-Id: Ibcca5229a9ca8de1f4beb6462535f61705fd4f8c Reviewed-on: https://pdfium-review.googlesource.com/2170 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/css/fde_cssdatatable.cpp')
-rw-r--r--xfa/fde/css/fde_cssdatatable.cpp687
1 files changed, 353 insertions, 334 deletions
diff --git a/xfa/fde/css/fde_cssdatatable.cpp b/xfa/fde/css/fde_cssdatatable.cpp
index b0e86c8a7e..910f7f4be0 100644
--- a/xfa/fde/css/fde_cssdatatable.cpp
+++ b/xfa/fde/css/fde_cssdatatable.cpp
@@ -21,10 +21,10 @@ bool FDE_CSSLengthToFloat(const FDE_CSSLENGTH& len,
FX_FLOAT fPercentBase,
FX_FLOAT& fResult) {
switch (len.GetUnit()) {
- case FDE_CSSLENGTHUNIT_Point:
+ case FDE_CSSLengthUnit::Point:
fResult = len.GetValue();
return true;
- case FDE_CSSLENGTHUNIT_Percent:
+ case FDE_CSSLengthUnit::Percent:
fResult = len.GetValue() * fPercentBase;
return true;
default:
@@ -94,7 +94,7 @@ CFX_FloatRect FDE_CSSBoundaryToRect(IFDE_CSSBoundaryStyle* pBoundStyle,
}
uint32_t FDE_CSSFontStyleToFDE(IFDE_CSSFontStyle* pFontStyle) {
uint32_t dwFontStyle = FX_FONTSTYLE_Normal;
- if (pFontStyle->GetFontStyle() == FDE_CSSFONTSTYLE_Italic) {
+ if (pFontStyle->GetFontStyle() == FDE_CSSFontStyle::Italic) {
dwFontStyle |= FX_FONTSTYLE_Italic;
}
if (pFontStyle->GetFontWeight() >= 700) {
@@ -102,445 +102,459 @@ uint32_t FDE_CSSFontStyleToFDE(IFDE_CSSFontStyle* pFontStyle) {
}
return dwFontStyle;
}
-static const FDE_CSSPROPERTYTABLE g_FDE_CSSProperties[] = {
- {FDE_CSSPROPERTY_WritingMode, L"writing-mode", 0x01878076,
+
+static const FDE_CSSPropertyTable g_FDE_CSSProperties[] = {
+ {FDE_CSSProperty::WritingMode, L"writing-mode", 0x01878076,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_ColumnRuleWidth, L"column-rule-width", 0x0200FB00,
+ {FDE_CSSProperty::ColumnRuleWidth, L"column-rule-width", 0x0200FB00,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_BorderLeft, L"border-left", 0x04080036,
+ {FDE_CSSProperty::BorderLeft, L"border-left", 0x04080036,
FDE_CSSVALUETYPE_Shorthand},
- {FDE_CSSPROPERTY_ColumnRule, L"column-rule", 0x04C83DF3,
+ {FDE_CSSProperty::ColumnRule, L"column-rule", 0x04C83DF3,
FDE_CSSVALUETYPE_Shorthand},
- {FDE_CSSPROPERTY_Height, L"height", 0x05A5C519,
+ {FDE_CSSProperty::Height, L"height", 0x05A5C519,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_CounterReset, L"counter-reset", 0x0894F9B0,
+ {FDE_CSSProperty::CounterReset, L"counter-reset", 0x0894F9B0,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber | FDE_CSSVALUETYPE_MaybeString},
- {FDE_CSSPROPERTY_Content, L"content", 0x097BE91B,
+ {FDE_CSSProperty::Content, L"content", 0x097BE91B,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeURI | FDE_CSSVALUETYPE_MaybeString},
- {FDE_CSSPROPERTY_RubyPosition, L"ruby-position", 0x09ACD024,
+ {FDE_CSSProperty::RubyPosition, L"ruby-position", 0x09ACD024,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_BackgroundColor, L"background-color", 0x09E8E8AC,
+ {FDE_CSSProperty::BackgroundColor, L"background-color", 0x09E8E8AC,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeColor},
- {FDE_CSSPROPERTY_Width, L"width", 0x0A8A8F80,
+ {FDE_CSSProperty::Width, L"width", 0x0A8A8F80,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_Src, L"src", 0x0BD37048,
+ {FDE_CSSProperty::Src, L"src", 0x0BD37048,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeURI},
- {FDE_CSSPROPERTY_Top, L"top", 0x0BEDAF33, FDE_CSSVALUETYPE_Primitive |
- FDE_CSSVALUETYPE_MaybeEnum |
- FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_Margin, L"margin", 0x0CB016BE,
+ {FDE_CSSProperty::Top, L"top", 0x0BEDAF33,
+ FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
+ FDE_CSSVALUETYPE_MaybeNumber},
+ {FDE_CSSProperty::Margin, L"margin", 0x0CB016BE,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_BorderColor, L"border-color", 0x0CBB528A,
+ {FDE_CSSProperty::BorderColor, L"border-color", 0x0CBB528A,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeColor},
- {FDE_CSSPROPERTY_Widows, L"widows", 0x1026C59D,
+ {FDE_CSSProperty::Widows, L"widows", 0x1026C59D,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_BorderBottomColor, L"border-bottom-color", 0x121E22EC,
+ {FDE_CSSProperty::BorderBottomColor, L"border-bottom-color", 0x121E22EC,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeColor},
- {FDE_CSSPROPERTY_TextIndent, L"text-indent", 0x169ADB74,
+ {FDE_CSSProperty::TextIndent, L"text-indent", 0x169ADB74,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_Right, L"right", 0x193ADE3E,
+ {FDE_CSSProperty::Right, L"right", 0x193ADE3E,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_TextEmphasisStyle, L"text-emphasis-style", 0x20DBAF4A,
+ {FDE_CSSProperty::TextEmphasisStyle, L"text-emphasis-style", 0x20DBAF4A,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeString},
- {FDE_CSSPROPERTY_PaddingLeft, L"padding-left", 0x228CF02F,
+ {FDE_CSSProperty::PaddingLeft, L"padding-left", 0x228CF02F,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_ColumnWidth, L"column-width", 0x24C9AC9B,
+ {FDE_CSSProperty::ColumnWidth, L"column-width", 0x24C9AC9B,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_MarginLeft, L"margin-left", 0x297C5656,
+ {FDE_CSSProperty::MarginLeft, L"margin-left", 0x297C5656,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeNumber |
FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_Border, L"border", 0x2A23349E, FDE_CSSVALUETYPE_Shorthand},
- {FDE_CSSPROPERTY_BorderTop, L"border-top", 0x2B866ADE,
+ {FDE_CSSProperty::Border, L"border", 0x2A23349E,
+ FDE_CSSVALUETYPE_Shorthand},
+ {FDE_CSSProperty::BorderTop, L"border-top", 0x2B866ADE,
FDE_CSSVALUETYPE_Shorthand},
- {FDE_CSSPROPERTY_RubyOverhang, L"ruby-overhang", 0x2CCA0D89,
+ {FDE_CSSProperty::RubyOverhang, L"ruby-overhang", 0x2CCA0D89,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_PageBreakBefore, L"page-break-before", 0x3119B36F,
+ {FDE_CSSProperty::PageBreakBefore, L"page-break-before", 0x3119B36F,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_MaxHeight, L"max-height", 0x343597EC,
+ {FDE_CSSProperty::MaxHeight, L"max-height", 0x343597EC,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_MinWidth, L"min-width", 0x35832871,
+ {FDE_CSSProperty::MinWidth, L"min-width", 0x35832871,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_BorderLeftColor, L"border-left-color", 0x35C64022,
+ {FDE_CSSProperty::BorderLeftColor, L"border-left-color", 0x35C64022,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeColor},
- {FDE_CSSPROPERTY_Bottom, L"bottom", 0x399F02B5,
+ {FDE_CSSProperty::Bottom, L"bottom", 0x399F02B5,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_Quotes, L"quotes", 0x3D8C6A01,
+ {FDE_CSSProperty::Quotes, L"quotes", 0x3D8C6A01,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeString},
- {FDE_CSSPROPERTY_MaxWidth, L"max-width", 0x3EA274F3,
+ {FDE_CSSProperty::MaxWidth, L"max-width", 0x3EA274F3,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_PaddingRight, L"padding-right", 0x3F616AC2,
+ {FDE_CSSProperty::PaddingRight, L"padding-right", 0x3F616AC2,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_ListStyleImage, L"list-style-image", 0x42A8A86A,
+ {FDE_CSSProperty::ListStyleImage, L"list-style-image", 0x42A8A86A,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeURI},
- {FDE_CSSPROPERTY_WhiteSpace, L"white-space", 0x42F0429A,
+ {FDE_CSSProperty::WhiteSpace, L"white-space", 0x42F0429A,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_BorderBottom, L"border-bottom", 0x452CE780,
+ {FDE_CSSProperty::BorderBottom, L"border-bottom", 0x452CE780,
FDE_CSSVALUETYPE_Shorthand},
- {FDE_CSSPROPERTY_ListStyleType, L"list-style-type", 0x48094789,
+ {FDE_CSSProperty::ListStyleType, L"list-style-type", 0x48094789,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_WordBreak, L"word-break", 0x4D74A3CE,
+ {FDE_CSSProperty::WordBreak, L"word-break", 0x4D74A3CE,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_OverflowX, L"overflow-x", 0x4ECEBF99,
+ {FDE_CSSProperty::OverflowX, L"overflow-x", 0x4ECEBF99,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_OverflowY, L"overflow-y", 0x4ECEBF9A,
+ {FDE_CSSProperty::OverflowY, L"overflow-y", 0x4ECEBF9A,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_BorderTopColor, L"border-top-color", 0x5109B8CA,
+ {FDE_CSSProperty::BorderTopColor, L"border-top-color", 0x5109B8CA,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeColor},
- {FDE_CSSPROPERTY_FontFamily, L"font-family", 0x574686E6,
+ {FDE_CSSProperty::FontFamily, L"font-family", 0x574686E6,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeString},
- {FDE_CSSPROPERTY_Cursor, L"cursor", 0x59DFCA5E,
+ {FDE_CSSProperty::Cursor, L"cursor", 0x59DFCA5E,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeString},
- {FDE_CSSPROPERTY_RubyAlign, L"ruby-align", 0x6077BDFA,
+ {FDE_CSSProperty::RubyAlign, L"ruby-align", 0x6077BDFA,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_ColumnRuleColor, L"column-rule-color", 0x65DDFD9F,
+ {FDE_CSSProperty::ColumnRuleColor, L"column-rule-color", 0x65DDFD9F,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeColor},
- {FDE_CSSPROPERTY_FontWeight, L"font-weight", 0x6692F60C,
+ {FDE_CSSProperty::FontWeight, L"font-weight", 0x6692F60C,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_BorderRightStyle, L"border-right-style", 0x6920DDA7,
+ {FDE_CSSProperty::BorderRightStyle, L"border-right-style", 0x6920DDA7,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_MinHeight, L"min-height", 0x6AAE312A,
+ {FDE_CSSProperty::MinHeight, L"min-height", 0x6AAE312A,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_Color, L"color", 0x6E67921F,
+ {FDE_CSSProperty::Color, L"color", 0x6E67921F,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeColor},
- {FDE_CSSPROPERTY_LetterSpacing, L"letter-spacing", 0x70536102,
+ {FDE_CSSProperty::LetterSpacing, L"letter-spacing", 0x70536102,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_EmptyCells, L"empty-cells", 0x7531528F,
+ {FDE_CSSProperty::EmptyCells, L"empty-cells", 0x7531528F,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_TextAlign, L"text-align", 0x7553F1BD,
+ {FDE_CSSProperty::TextAlign, L"text-align", 0x7553F1BD,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_RubySpan, L"ruby-span", 0x76FCFCE1,
+ {FDE_CSSProperty::RubySpan, L"ruby-span", 0x76FCFCE1,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeFunction},
- {FDE_CSSPROPERTY_Position, L"position", 0x814F82B5,
+ {FDE_CSSProperty::Position, L"position", 0x814F82B5,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_BorderStyle, L"border-style", 0x82A4CD5C,
+ {FDE_CSSProperty::BorderStyle, L"border-style", 0x82A4CD5C,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_BorderBottomStyle, L"border-bottom-style", 0x88079DBE,
+ {FDE_CSSProperty::BorderBottomStyle, L"border-bottom-style", 0x88079DBE,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_BorderCollapse, L"border-collapse", 0x8883C7FE,
+ {FDE_CSSProperty::BorderCollapse, L"border-collapse", 0x8883C7FE,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_ColumnCount, L"column-count", 0x89936A64,
+ {FDE_CSSProperty::ColumnCount, L"column-count", 0x89936A64,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_BorderRightWidth, L"border-right-width", 0x8F5A6036,
+ {FDE_CSSProperty::BorderRightWidth, L"border-right-width", 0x8F5A6036,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_UnicodeBidi, L"unicode-bidi", 0x91670F6C,
+ {FDE_CSSProperty::UnicodeBidi, L"unicode-bidi", 0x91670F6C,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_VerticalAlign, L"vertical-align", 0x934A87D2,
+ {FDE_CSSProperty::VerticalAlign, L"vertical-align", 0x934A87D2,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_PaddingTop, L"padding-top", 0x959D22B7,
+ {FDE_CSSProperty::PaddingTop, L"padding-top", 0x959D22B7,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_Columns, L"columns", 0x96FA5D81,
+ {FDE_CSSProperty::Columns, L"columns", 0x96FA5D81,
FDE_CSSVALUETYPE_Shorthand},
- {FDE_CSSPROPERTY_Overflow, L"overflow", 0x97B76B54,
+ {FDE_CSSProperty::Overflow, L"overflow", 0x97B76B54,
FDE_CSSVALUETYPE_Shorthand},
- {FDE_CSSPROPERTY_TableLayout, L"table-layout", 0x9B1CB4B3,
+ {FDE_CSSProperty::TableLayout, L"table-layout", 0x9B1CB4B3,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_FontVariant, L"font-variant", 0x9C785779,
+ {FDE_CSSProperty::FontVariant, L"font-variant", 0x9C785779,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_ListStyle, L"list-style", 0x9E6C471A,
+ {FDE_CSSProperty::ListStyle, L"list-style", 0x9E6C471A,
FDE_CSSVALUETYPE_Shorthand},
- {FDE_CSSPROPERTY_BackgroundPosition, L"background-position", 0xA8846D22,
+ {FDE_CSSProperty::BackgroundPosition, L"background-position", 0xA8846D22,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_BorderWidth, L"border-width", 0xA8DE4FEB,
+ {FDE_CSSProperty::BorderWidth, L"border-width", 0xA8DE4FEB,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_TextEmphasisColor, L"text-emphasis-color", 0xAAF23478,
+ {FDE_CSSProperty::TextEmphasisColor, L"text-emphasis-color", 0xAAF23478,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeColor},
- {FDE_CSSPROPERTY_BorderLeftStyle, L"border-left-style", 0xABAFBAF4,
+ {FDE_CSSProperty::BorderLeftStyle, L"border-left-style", 0xABAFBAF4,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_PageBreakInside, L"page-break-inside", 0xACB695F8,
+ {FDE_CSSProperty::PageBreakInside, L"page-break-inside", 0xACB695F8,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_TextEmphasis, L"text-emphasis", 0xAD0E580C,
+ {FDE_CSSProperty::TextEmphasis, L"text-emphasis", 0xAD0E580C,
FDE_CSSVALUETYPE_Shorthand},
- {FDE_CSSPROPERTY_BorderBottomWidth, L"border-bottom-width", 0xAE41204D,
+ {FDE_CSSProperty::BorderBottomWidth, L"border-bottom-width", 0xAE41204D,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_ColumnGap, L"column-gap", 0xB5C1BA73,
+ {FDE_CSSProperty::ColumnGap, L"column-gap", 0xB5C1BA73,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_Orphans, L"orphans", 0xB716467B,
+ {FDE_CSSProperty::Orphans, L"orphans", 0xB716467B,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_BorderRight, L"border-right", 0xB78E9EA9,
+ {FDE_CSSProperty::BorderRight, L"border-right", 0xB78E9EA9,
FDE_CSSVALUETYPE_Shorthand},
- {FDE_CSSPROPERTY_FontSize, L"font-size", 0xB93956DF,
+ {FDE_CSSProperty::FontSize, L"font-size", 0xB93956DF,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_PageBreakAfter, L"page-break-after", 0xBC358AEE,
+ {FDE_CSSProperty::PageBreakAfter, L"page-break-after", 0xBC358AEE,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_CaptionSide, L"caption-side", 0xC03F3560,
+ {FDE_CSSProperty::CaptionSide, L"caption-side", 0xC03F3560,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_BackgroundRepeat, L"background-repeat", 0xC2C2FDCE,
+ {FDE_CSSProperty::BackgroundRepeat, L"background-repeat", 0xC2C2FDCE,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_BorderTopStyle, L"border-top-style", 0xC6F3339C,
+ {FDE_CSSProperty::BorderTopStyle, L"border-top-style", 0xC6F3339C,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_BorderSpacing, L"border-spacing", 0xC72030F0,
+ {FDE_CSSProperty::BorderSpacing, L"border-spacing", 0xC72030F0,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_TextTransform, L"text-transform", 0xC88EEA6E,
+ {FDE_CSSProperty::TextTransform, L"text-transform", 0xC88EEA6E,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_FontStyle, L"font-style", 0xCB1950F5,
+ {FDE_CSSProperty::FontStyle, L"font-style", 0xCB1950F5,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_Font, L"font", 0xCD308B77, FDE_CSSVALUETYPE_Shorthand},
- {FDE_CSSPROPERTY_LineHeight, L"line-height", 0xCFCACE2E,
+ {FDE_CSSProperty::Font, L"font", 0xCD308B77, FDE_CSSVALUETYPE_Shorthand},
+ {FDE_CSSProperty::LineHeight, L"line-height", 0xCFCACE2E,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_MarginRight, L"margin-right", 0xD13C58C9,
+ {FDE_CSSProperty::MarginRight, L"margin-right", 0xD13C58C9,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeNumber |
FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_Float, L"float", 0xD1532876,
+ {FDE_CSSProperty::Float, L"float", 0xD1532876,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_BorderLeftWidth, L"border-left-width", 0xD1E93D83,
+ {FDE_CSSProperty::BorderLeftWidth, L"border-left-width", 0xD1E93D83,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_Display, L"display", 0xD4224C36,
+ {FDE_CSSProperty::Display, L"display", 0xD4224C36,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_Clear, L"clear", 0xD8ED1467,
+ {FDE_CSSProperty::Clear, L"clear", 0xD8ED1467,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_ColumnRuleStyle, L"column-rule-style", 0xDBC77871,
+ {FDE_CSSProperty::ColumnRuleStyle, L"column-rule-style", 0xDBC77871,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_TextCombine, L"text-combine", 0xDC5207CF,
+ {FDE_CSSProperty::TextCombine, L"text-combine", 0xDC5207CF,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_ListStylePosition, L"list-style-position", 0xE1A1DE3C,
+ {FDE_CSSProperty::ListStylePosition, L"list-style-position", 0xE1A1DE3C,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_Visibility, L"visibility", 0xE29F5168,
+ {FDE_CSSProperty::Visibility, L"visibility", 0xE29F5168,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_PaddingBottom, L"padding-bottom", 0xE555B3B9,
+ {FDE_CSSProperty::PaddingBottom, L"padding-bottom", 0xE555B3B9,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_BackgroundAttachment, L"background-attachment", 0xE77981F6,
- FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_BackgroundImage, L"background-image", 0xE9AEB710,
+ {FDE_CSSProperty::BackgroundAttachment, L"background-attachment",
+ 0xE77981F6, FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
+ {FDE_CSSProperty::BackgroundImage, L"background-image", 0xE9AEB710,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeURI},
- {FDE_CSSPROPERTY_LineBreak, L"line-break", 0xEA2D1D9A,
+ {FDE_CSSProperty::LineBreak, L"line-break", 0xEA2D1D9A,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_Background, L"background", 0xEB49DD40,
+ {FDE_CSSProperty::Background, L"background", 0xEB49DD40,
FDE_CSSVALUETYPE_Shorthand},
- {FDE_CSSPROPERTY_BorderTopWidth, L"border-top-width", 0xED2CB62B,
+ {FDE_CSSProperty::BorderTopWidth, L"border-top-width", 0xED2CB62B,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_WordSpacing, L"word-spacing", 0xEDA63BAE,
+ {FDE_CSSProperty::WordSpacing, L"word-spacing", 0xEDA63BAE,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_BorderRightColor, L"border-right-color", 0xF33762D5,
+ {FDE_CSSProperty::BorderRightColor, L"border-right-color", 0xF33762D5,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeColor},
- {FDE_CSSPROPERTY_CounterIncrement, L"counter-increment", 0xF4CFB1B2,
+ {FDE_CSSProperty::CounterIncrement, L"counter-increment", 0xF4CFB1B2,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber | FDE_CSSVALUETYPE_MaybeString},
- {FDE_CSSPROPERTY_Left, L"left", 0xF5AD782B,
+ {FDE_CSSProperty::Left, L"left", 0xF5AD782B,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum |
FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_TextDecoration, L"text-decoration", 0xF7C634BA,
+ {FDE_CSSProperty::TextDecoration, L"text-decoration", 0xF7C634BA,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_Padding, L"padding", 0xF8C373F7,
+ {FDE_CSSProperty::Padding, L"padding", 0xF8C373F7,
FDE_CSSVALUETYPE_List | FDE_CSSVALUETYPE_MaybeNumber},
- {FDE_CSSPROPERTY_MarginBottom, L"margin-bottom", 0xF93485A0,
+ {FDE_CSSProperty::MarginBottom, L"margin-bottom", 0xF93485A0,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeNumber |
FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_MarginTop, L"margin-top", 0xFE51DCFE,
+ {FDE_CSSProperty::MarginTop, L"margin-top", 0xFE51DCFE,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeNumber |
FDE_CSSVALUETYPE_MaybeEnum},
- {FDE_CSSPROPERTY_Direction, L"direction", 0xFE746E61,
+ {FDE_CSSProperty::Direction, L"direction", 0xFE746E61,
FDE_CSSVALUETYPE_Primitive | FDE_CSSVALUETYPE_MaybeEnum},
};
-static const FDE_CSSPROPERTYVALUETABLE g_FDE_CSSPropertyValues[] = {
- {FDE_CSSPROPERTYVALUE_Bolder, L"bolder", 0x009F1058},
- {FDE_CSSPROPERTYVALUE_LowerLatin, L"lower-latin", 0x016014CE},
- {FDE_CSSPROPERTYVALUE_Lowercase, L"lowercase", 0x02ACB805},
- {FDE_CSSPROPERTYVALUE_LowerGreek, L"lower-greek", 0x03D81D64},
- {FDE_CSSPROPERTYVALUE_Sesame, L"sesame", 0x0432ECDE},
- {FDE_CSSPROPERTYVALUE_None, L"none", 0x048B6670},
- {FDE_CSSPROPERTYVALUE_NwResize, L"nw-resize", 0x054B4BE4},
- {FDE_CSSPROPERTYVALUE_WResize, L"w-resize", 0x0A2F8D76},
- {FDE_CSSPROPERTYVALUE_Dot, L"dot", 0x0A48CB27},
- {FDE_CSSPROPERTYVALUE_End, L"end", 0x0A631437},
- {FDE_CSSPROPERTYVALUE_Ltr, L"ltr", 0x0B1B56D2},
- {FDE_CSSPROPERTYVALUE_Pre, L"pre", 0x0B848587},
- {FDE_CSSPROPERTYVALUE_Rtl, L"rtl", 0x0BB92C52},
- {FDE_CSSPROPERTYVALUE_Sub, L"sub", 0x0BD37FAA},
- {FDE_CSSPROPERTYVALUE_Top, L"top", 0x0BEDAF33},
- {FDE_CSSPROPERTYVALUE_Visible, L"visible", 0x0F55D7EE},
- {FDE_CSSPROPERTYVALUE_Filled, L"filled", 0x10827DD0},
- {FDE_CSSPROPERTYVALUE_SwResize, L"sw-resize", 0x10B548E9},
- {FDE_CSSPROPERTYVALUE_NoRepeat, L"no-repeat", 0x1235C18B},
- {FDE_CSSPROPERTYVALUE_Default, L"default", 0x14DA2125},
- {FDE_CSSPROPERTYVALUE_Transparent, L"transparent", 0x17B64DB2},
- {FDE_CSSPROPERTYVALUE_Ridge, L"ridge", 0x18EBEE4B},
- {FDE_CSSPROPERTYVALUE_Right, L"right", 0x193ADE3E},
- {FDE_CSSPROPERTYVALUE_HorizontalTb, L"horizontal-tb", 0x1A66A86D},
- {FDE_CSSPROPERTYVALUE_DistributeLetter, L"distribute-letter", 0x1EDBD75C},
- {FDE_CSSPROPERTYVALUE_DoubleCircle, L"double-circle", 0x1FF082BA},
- {FDE_CSSPROPERTYVALUE_Ruby, L"ruby", 0x20D66C02},
- {FDE_CSSPROPERTYVALUE_Collapse, L"collapse", 0x2128D673},
- {FDE_CSSPROPERTYVALUE_Normal, L"normal", 0x247CF3E9},
- {FDE_CSSPROPERTYVALUE_Avoid, L"avoid", 0x24E684B3},
- {FDE_CSSPROPERTYVALUE_UpperRoman, L"upper-roman", 0x28BAC2B6},
- {FDE_CSSPROPERTYVALUE_Auto, L"auto", 0x2B35B6D9},
- {FDE_CSSPROPERTYVALUE_Text, L"text", 0x2D08AF85},
- {FDE_CSSPROPERTYVALUE_XSmall, L"x-small", 0x2D2FCAFE},
- {FDE_CSSPROPERTYVALUE_Thin, L"thin", 0x2D574D53},
- {FDE_CSSPROPERTYVALUE_Repeat, L"repeat", 0x306614A1},
- {FDE_CSSPROPERTYVALUE_Small, L"small", 0x316A3739},
- {FDE_CSSPROPERTYVALUE_NeResize, L"ne-resize", 0x31FD5E12},
- {FDE_CSSPROPERTYVALUE_NoContent, L"no-content", 0x33A1C545},
- {FDE_CSSPROPERTYVALUE_Outside, L"outside", 0x36DF693D},
- {FDE_CSSPROPERTYVALUE_EResize, L"e-resize", 0x36E19FA4},
- {FDE_CSSPROPERTYVALUE_TableRow, L"table-row", 0x3912A02D},
- {FDE_CSSPROPERTYVALUE_Bottom, L"bottom", 0x399F02B5},
- {FDE_CSSPROPERTYVALUE_Underline, L"underline", 0x3A0273A6},
- {FDE_CSSPROPERTYVALUE_CjkIdeographic, L"cjk-ideographic", 0x3A641CC4},
- {FDE_CSSPROPERTYVALUE_SeResize, L"se-resize", 0x3D675B17},
- {FDE_CSSPROPERTYVALUE_Fixed, L"fixed", 0x3D7DEB10},
- {FDE_CSSPROPERTYVALUE_Double, L"double", 0x3D98515B},
- {FDE_CSSPROPERTYVALUE_Solid, L"solid", 0x40623B5B},
- {FDE_CSSPROPERTYVALUE_RubyBaseGroup, L"ruby-base-group", 0x41014E84},
- {FDE_CSSPROPERTYVALUE_OpenQuote, L"open-quote", 0x44A41E8D},
- {FDE_CSSPROPERTYVALUE_Lighter, L"lighter", 0x45BEB7AF},
- {FDE_CSSPROPERTYVALUE_LowerRoman, L"lower-roman", 0x5044D253},
- {FDE_CSSPROPERTYVALUE_Strict, L"strict", 0x52F4EBD9},
- {FDE_CSSPROPERTYVALUE_TableCaption, L"table-caption", 0x5325CD63},
- {FDE_CSSPROPERTYVALUE_Oblique, L"oblique", 0x53EBDDB1},
- {FDE_CSSPROPERTYVALUE_Decimal, L"decimal", 0x54034C2F},
- {FDE_CSSPROPERTYVALUE_Loose, L"loose", 0x54D3A1E2},
- {FDE_CSSPROPERTYVALUE_Hebrew, L"hebrew", 0x565792DD},
- {FDE_CSSPROPERTYVALUE_Hidden, L"hidden", 0x573CB40C},
- {FDE_CSSPROPERTYVALUE_Dashed, L"dashed", 0x58A3DD29},
- {FDE_CSSPROPERTYVALUE_Embed, L"embed", 0x59C8F27D},
- {FDE_CSSPROPERTYVALUE_TableRowGroup, L"table-row-group", 0x5A43BD07},
- {FDE_CSSPROPERTYVALUE_TableColumn, L"table-column", 0x5E705DA3},
- {FDE_CSSPROPERTYVALUE_Static, L"static", 0x5E7555E8},
- {FDE_CSSPROPERTYVALUE_Outset, L"outset", 0x61236164},
- {FDE_CSSPROPERTYVALUE_DecimalLeadingZero, L"decimal-leading-zero",
+const int32_t g_iCSSPropertyCount =
+ sizeof(g_FDE_CSSProperties) / sizeof(FDE_CSSPropertyTable);
+
+static const FDE_CSSPropertyValueTable g_FDE_CSSPropertyValues[] = {
+ {FDE_CSSPropertyValue::Bolder, L"bolder", 0x009F1058},
+ {FDE_CSSPropertyValue::LowerLatin, L"lower-latin", 0x016014CE},
+ {FDE_CSSPropertyValue::Lowercase, L"lowercase", 0x02ACB805},
+ {FDE_CSSPropertyValue::LowerGreek, L"lower-greek", 0x03D81D64},
+ {FDE_CSSPropertyValue::Sesame, L"sesame", 0x0432ECDE},
+ {FDE_CSSPropertyValue::None, L"none", 0x048B6670},
+ {FDE_CSSPropertyValue::NwResize, L"nw-resize", 0x054B4BE4},
+ {FDE_CSSPropertyValue::WResize, L"w-resize", 0x0A2F8D76},
+ {FDE_CSSPropertyValue::Dot, L"dot", 0x0A48CB27},
+ {FDE_CSSPropertyValue::End, L"end", 0x0A631437},
+ {FDE_CSSPropertyValue::Ltr, L"ltr", 0x0B1B56D2},
+ {FDE_CSSPropertyValue::Pre, L"pre", 0x0B848587},
+ {FDE_CSSPropertyValue::Rtl, L"rtl", 0x0BB92C52},
+ {FDE_CSSPropertyValue::Sub, L"sub", 0x0BD37FAA},
+ {FDE_CSSPropertyValue::Top, L"top", 0x0BEDAF33},
+ {FDE_CSSPropertyValue::Visible, L"visible", 0x0F55D7EE},
+ {FDE_CSSPropertyValue::Filled, L"filled", 0x10827DD0},
+ {FDE_CSSPropertyValue::SwResize, L"sw-resize", 0x10B548E9},
+ {FDE_CSSPropertyValue::NoRepeat, L"no-repeat", 0x1235C18B},
+ {FDE_CSSPropertyValue::Default, L"default", 0x14DA2125},
+ {FDE_CSSPropertyValue::Transparent, L"transparent", 0x17B64DB2},
+ {FDE_CSSPropertyValue::Ridge, L"ridge", 0x18EBEE4B},
+ {FDE_CSSPropertyValue::Right, L"right", 0x193ADE3E},
+ {FDE_CSSPropertyValue::HorizontalTb, L"horizontal-tb", 0x1A66A86D},
+ {FDE_CSSPropertyValue::DistributeLetter, L"distribute-letter", 0x1EDBD75C},
+ {FDE_CSSPropertyValue::DoubleCircle, L"double-circle", 0x1FF082BA},
+ {FDE_CSSPropertyValue::Ruby, L"ruby", 0x20D66C02},
+ {FDE_CSSPropertyValue::Collapse, L"collapse", 0x2128D673},
+ {FDE_CSSPropertyValue::Normal, L"normal", 0x247CF3E9},
+ {FDE_CSSPropertyValue::Avoid, L"avoid", 0x24E684B3},
+ {FDE_CSSPropertyValue::UpperRoman, L"upper-roman", 0x28BAC2B6},
+ {FDE_CSSPropertyValue::Auto, L"auto", 0x2B35B6D9},
+ {FDE_CSSPropertyValue::Text, L"text", 0x2D08AF85},
+ {FDE_CSSPropertyValue::XSmall, L"x-small", 0x2D2FCAFE},
+ {FDE_CSSPropertyValue::Thin, L"thin", 0x2D574D53},
+ {FDE_CSSPropertyValue::Repeat, L"repeat", 0x306614A1},
+ {FDE_CSSPropertyValue::Small, L"small", 0x316A3739},
+ {FDE_CSSPropertyValue::NeResize, L"ne-resize", 0x31FD5E12},
+ {FDE_CSSPropertyValue::NoContent, L"no-content", 0x33A1C545},
+ {FDE_CSSPropertyValue::Outside, L"outside", 0x36DF693D},
+ {FDE_CSSPropertyValue::EResize, L"e-resize", 0x36E19FA4},
+ {FDE_CSSPropertyValue::TableRow, L"table-row", 0x3912A02D},
+ {FDE_CSSPropertyValue::Bottom, L"bottom", 0x399F02B5},
+ {FDE_CSSPropertyValue::Underline, L"underline", 0x3A0273A6},
+ {FDE_CSSPropertyValue::CjkIdeographic, L"cjk-ideographic", 0x3A641CC4},
+ {FDE_CSSPropertyValue::SeResize, L"se-resize", 0x3D675B17},
+ {FDE_CSSPropertyValue::Fixed, L"fixed", 0x3D7DEB10},
+ {FDE_CSSPropertyValue::Double, L"double", 0x3D98515B},
+ {FDE_CSSPropertyValue::Solid, L"solid", 0x40623B5B},
+ {FDE_CSSPropertyValue::RubyBaseGroup, L"ruby-base-group", 0x41014E84},
+ {FDE_CSSPropertyValue::OpenQuote, L"open-quote", 0x44A41E8D},
+ {FDE_CSSPropertyValue::Lighter, L"lighter", 0x45BEB7AF},
+ {FDE_CSSPropertyValue::LowerRoman, L"lower-roman", 0x5044D253},
+ {FDE_CSSPropertyValue::Strict, L"strict", 0x52F4EBD9},
+ {FDE_CSSPropertyValue::TableCaption, L"table-caption", 0x5325CD63},
+ {FDE_CSSPropertyValue::Oblique, L"oblique", 0x53EBDDB1},
+ {FDE_CSSPropertyValue::Decimal, L"decimal", 0x54034C2F},
+ {FDE_CSSPropertyValue::Loose, L"loose", 0x54D3A1E2},
+ {FDE_CSSPropertyValue::Hebrew, L"hebrew", 0x565792DD},
+ {FDE_CSSPropertyValue::Hidden, L"hidden", 0x573CB40C},
+ {FDE_CSSPropertyValue::Dashed, L"dashed", 0x58A3DD29},
+ {FDE_CSSPropertyValue::Embed, L"embed", 0x59C8F27D},
+ {FDE_CSSPropertyValue::TableRowGroup, L"table-row-group", 0x5A43BD07},
+ {FDE_CSSPropertyValue::TableColumn, L"table-column", 0x5E705DA3},
+ {FDE_CSSPropertyValue::Static, L"static", 0x5E7555E8},
+ {FDE_CSSPropertyValue::Outset, L"outset", 0x61236164},
+ {FDE_CSSPropertyValue::DecimalLeadingZero, L"decimal-leading-zero",
0x61DFC55D},
- {FDE_CSSPROPERTYVALUE_KeepWords, L"keep-words", 0x63964801},
- {FDE_CSSPROPERTYVALUE_KatakanaIroha, L"katakana-iroha", 0x65D7C91C},
- {FDE_CSSPROPERTYVALUE_Super, L"super", 0x6A4F842F},
- {FDE_CSSPROPERTYVALUE_Center, L"center", 0x6C51AFC1},
- {FDE_CSSPROPERTYVALUE_TableHeaderGroup, L"table-header-group", 0x706103D8},
- {FDE_CSSPROPERTYVALUE_Inside, L"inside", 0x709CB0FC},
- {FDE_CSSPROPERTYVALUE_XxLarge, L"xx-large", 0x70BB1508},
- {FDE_CSSPROPERTYVALUE_Triangle, L"triangle", 0x7524EDF6},
- {FDE_CSSPROPERTYVALUE_RubyTextGroup, L"ruby-text-group", 0x78C2B98E},
- {FDE_CSSPROPERTYVALUE_Circle, L"circle", 0x7ABEC0D2},
- {FDE_CSSPROPERTYVALUE_Hiragana, L"hiragana", 0x7BF5E25B},
- {FDE_CSSPROPERTYVALUE_RepeatX, L"repeat-x", 0x7C8F3226},
- {FDE_CSSPROPERTYVALUE_RepeatY, L"repeat-y", 0x7C8F3227},
- {FDE_CSSPROPERTYVALUE_Move, L"move", 0x7DA03417},
- {FDE_CSSPROPERTYVALUE_HiraganaIroha, L"hiragana-iroha", 0x7EE863FB},
- {FDE_CSSPROPERTYVALUE_RubyBase, L"ruby-base", 0x7FD1B1EA},
- {FDE_CSSPROPERTYVALUE_Scroll, L"scroll", 0x84787AEF},
- {FDE_CSSPROPERTYVALUE_Smaller, L"smaller", 0x849769F0},
- {FDE_CSSPROPERTYVALUE_TableFooterGroup, L"table-footer-group", 0x85BDD97E},
- {FDE_CSSPROPERTYVALUE_Baseline, L"baseline", 0x87436BA3},
- {FDE_CSSPROPERTYVALUE_Separate, L"separate", 0x877C66B5},
- {FDE_CSSPROPERTYVALUE_Armenian, L"armenian", 0x889BE4EB},
- {FDE_CSSPROPERTYVALUE_Open, L"open", 0x8B90E1F2},
- {FDE_CSSPROPERTYVALUE_Relative, L"relative", 0x8C995B5C},
- {FDE_CSSPROPERTYVALUE_Thick, L"thick", 0x8CC35EB3},
- {FDE_CSSPROPERTYVALUE_Justify, L"justify", 0x8D269CAE},
- {FDE_CSSPROPERTYVALUE_Middle, L"middle", 0x947FA00F},
- {FDE_CSSPROPERTYVALUE_Always, L"always", 0x959AB231},
- {FDE_CSSPROPERTYVALUE_DistributeSpace, L"distribute-space", 0x97A20E58},
- {FDE_CSSPROPERTYVALUE_LineEdge, L"line-edge", 0x9A845D2A},
- {FDE_CSSPROPERTYVALUE_PreWrap, L"pre-wrap", 0x9D59588E},
- {FDE_CSSPROPERTYVALUE_Medium, L"medium", 0xA084A381},
- {FDE_CSSPROPERTYVALUE_NResize, L"n-resize", 0xA088968D},
- {FDE_CSSPROPERTYVALUE_ListItem, L"list-item", 0xA32382B8},
- {FDE_CSSPROPERTYVALUE_Show, L"show", 0xA66C10C1},
- {FDE_CSSPROPERTYVALUE_Currentcolor, L"currentColor", 0xA7883922},
- {FDE_CSSPROPERTYVALUE_NoCloseQuote, L"no-close-quote", 0xA79CBFFB},
- {FDE_CSSPROPERTYVALUE_VerticalLr, L"vertical-lr", 0xA8673F65},
- {FDE_CSSPROPERTYVALUE_VerticalRl, L"vertical-rl", 0xA8675E25},
- {FDE_CSSPROPERTYVALUE_Pointer, L"pointer", 0xA90929C1},
- {FDE_CSSPROPERTYVALUE_XxSmall, L"xx-small", 0xADE1FC76},
- {FDE_CSSPROPERTYVALUE_Bold, L"bold", 0xB18313A1},
- {FDE_CSSPROPERTYVALUE_Both, L"both", 0xB1833CAD},
- {FDE_CSSPROPERTYVALUE_SmallCaps, L"small-caps", 0xB299428D},
- {FDE_CSSPROPERTYVALUE_Katakana, L"katakana", 0xB421A4BC},
- {FDE_CSSPROPERTYVALUE_After, L"after", 0xB6B44172},
- {FDE_CSSPROPERTYVALUE_Horizontal, L"horizontal", 0xB7732DEA},
- {FDE_CSSPROPERTYVALUE_Dotted, L"dotted", 0xB88652A4},
- {FDE_CSSPROPERTYVALUE_Disc, L"disc", 0xBEBC18C3},
- {FDE_CSSPROPERTYVALUE_Georgian, L"georgian", 0xBEF99E8C},
- {FDE_CSSPROPERTYVALUE_Inline, L"inline", 0xC02D649F},
- {FDE_CSSPROPERTYVALUE_Overline, L"overline", 0xC0EC9FA4},
- {FDE_CSSPROPERTYVALUE_Wait, L"wait", 0xC1613BB5},
- {FDE_CSSPROPERTYVALUE_BreakAll, L"break-all", 0xC3145BAB},
- {FDE_CSSPROPERTYVALUE_UpperAlpha, L"upper-alpha", 0xC52D4A9F},
- {FDE_CSSPROPERTYVALUE_Capitalize, L"capitalize", 0xC5321D46},
- {FDE_CSSPROPERTYVALUE_Nowrap, L"nowrap", 0xC7994417},
- {FDE_CSSPROPERTYVALUE_TextBottom, L"text-bottom", 0xC7D08D87},
- {FDE_CSSPROPERTYVALUE_NoOpenQuote, L"no-open-quote", 0xC8CD7877},
- {FDE_CSSPROPERTYVALUE_Groove, L"groove", 0xCB24A412},
- {FDE_CSSPROPERTYVALUE_Progress, L"progress", 0xCD1D9835},
- {FDE_CSSPROPERTYVALUE_Larger, L"larger", 0xCD3C409D},
- {FDE_CSSPROPERTYVALUE_CloseQuote, L"close-quote", 0xCF8696D1},
- {FDE_CSSPROPERTYVALUE_TableCell, L"table-cell", 0xCFB5E595},
- {FDE_CSSPROPERTYVALUE_PreLine, L"pre-line", 0xD04FEDBC},
- {FDE_CSSPROPERTYVALUE_Absolute, L"absolute", 0xD0B2D55F},
- {FDE_CSSPROPERTYVALUE_InlineTable, L"inline-table", 0xD131F494},
- {FDE_CSSPROPERTYVALUE_BidiOverride, L"bidi-override", 0xD161FDE5},
- {FDE_CSSPROPERTYVALUE_InlineBlock, L"inline-block", 0xD26A8BD7},
- {FDE_CSSPROPERTYVALUE_Inset, L"inset", 0xD6F23243},
- {FDE_CSSPROPERTYVALUE_Crosshair, L"crosshair", 0xD6F8018E},
- {FDE_CSSPROPERTYVALUE_UpperLatin, L"upper-latin", 0xD9D60531},
- {FDE_CSSPROPERTYVALUE_Help, L"help", 0xDA002969},
- {FDE_CSSPROPERTYVALUE_Hide, L"hide", 0xDA69395A},
- {FDE_CSSPROPERTYVALUE_Uppercase, L"uppercase", 0xDAD595A8},
- {FDE_CSSPROPERTYVALUE_SResize, L"s-resize", 0xDB3AADF2},
- {FDE_CSSPROPERTYVALUE_Table, L"table", 0xDB9BE968},
- {FDE_CSSPROPERTYVALUE_Blink, L"blink", 0xDC36E390},
- {FDE_CSSPROPERTYVALUE_Block, L"block", 0xDCD480AB},
- {FDE_CSSPROPERTYVALUE_Start, L"start", 0xE1D9D5AE},
- {FDE_CSSPROPERTYVALUE_TableColumnGroup, L"table-column-group", 0xE2258EFD},
- {FDE_CSSPROPERTYVALUE_Italic, L"italic", 0xE31D5396},
- {FDE_CSSPROPERTYVALUE_LineThrough, L"line-through", 0xE4C5A276},
- {FDE_CSSPROPERTYVALUE_KeepAll, L"keep-all", 0xE704A72B},
- {FDE_CSSPROPERTYVALUE_LowerAlpha, L"lower-alpha", 0xECB75A3C},
- {FDE_CSSPROPERTYVALUE_RunIn, L"run-in", 0xEEC930B9},
- {FDE_CSSPROPERTYVALUE_Square, L"square", 0xEF85D351},
- {FDE_CSSPROPERTYVALUE_XLarge, L"x-large", 0xF008E390},
- {FDE_CSSPROPERTYVALUE_Large, L"large", 0xF4434FCB},
- {FDE_CSSPROPERTYVALUE_Before, L"before", 0xF4FFCE73},
- {FDE_CSSPROPERTYVALUE_Left, L"left", 0xF5AD782B},
- {FDE_CSSPROPERTYVALUE_TextTop, L"text-top", 0xFCB58D45},
- {FDE_CSSPROPERTYVALUE_RubyText, L"ruby-text", 0xFCC77174},
- {FDE_CSSPROPERTYVALUE_NoDisplay, L"no-display", 0xFE482860},
+ {FDE_CSSPropertyValue::KeepWords, L"keep-words", 0x63964801},
+ {FDE_CSSPropertyValue::KatakanaIroha, L"katakana-iroha", 0x65D7C91C},
+ {FDE_CSSPropertyValue::Super, L"super", 0x6A4F842F},
+ {FDE_CSSPropertyValue::Center, L"center", 0x6C51AFC1},
+ {FDE_CSSPropertyValue::TableHeaderGroup, L"table-header-group", 0x706103D8},
+ {FDE_CSSPropertyValue::Inside, L"inside", 0x709CB0FC},
+ {FDE_CSSPropertyValue::XxLarge, L"xx-large", 0x70BB1508},
+ {FDE_CSSPropertyValue::Triangle, L"triangle", 0x7524EDF6},
+ {FDE_CSSPropertyValue::RubyTextGroup, L"ruby-text-group", 0x78C2B98E},
+ {FDE_CSSPropertyValue::Circle, L"circle", 0x7ABEC0D2},
+ {FDE_CSSPropertyValue::Hiragana, L"hiragana", 0x7BF5E25B},
+ {FDE_CSSPropertyValue::RepeatX, L"repeat-x", 0x7C8F3226},
+ {FDE_CSSPropertyValue::RepeatY, L"repeat-y", 0x7C8F3227},
+ {FDE_CSSPropertyValue::Move, L"move", 0x7DA03417},
+ {FDE_CSSPropertyValue::HiraganaIroha, L"hiragana-iroha", 0x7EE863FB},
+ {FDE_CSSPropertyValue::RubyBase, L"ruby-base", 0x7FD1B1EA},
+ {FDE_CSSPropertyValue::Scroll, L"scroll", 0x84787AEF},
+ {FDE_CSSPropertyValue::Smaller, L"smaller", 0x849769F0},
+ {FDE_CSSPropertyValue::TableFooterGroup, L"table-footer-group", 0x85BDD97E},
+ {FDE_CSSPropertyValue::Baseline, L"baseline", 0x87436BA3},
+ {FDE_CSSPropertyValue::Separate, L"separate", 0x877C66B5},
+ {FDE_CSSPropertyValue::Armenian, L"armenian", 0x889BE4EB},
+ {FDE_CSSPropertyValue::Open, L"open", 0x8B90E1F2},
+ {FDE_CSSPropertyValue::Relative, L"relative", 0x8C995B5C},
+ {FDE_CSSPropertyValue::Thick, L"thick", 0x8CC35EB3},
+ {FDE_CSSPropertyValue::Justify, L"justify", 0x8D269CAE},
+ {FDE_CSSPropertyValue::Middle, L"middle", 0x947FA00F},
+ {FDE_CSSPropertyValue::Always, L"always", 0x959AB231},
+ {FDE_CSSPropertyValue::DistributeSpace, L"distribute-space", 0x97A20E58},
+ {FDE_CSSPropertyValue::LineEdge, L"line-edge", 0x9A845D2A},
+ {FDE_CSSPropertyValue::PreWrap, L"pre-wrap", 0x9D59588E},
+ {FDE_CSSPropertyValue::Medium, L"medium", 0xA084A381},
+ {FDE_CSSPropertyValue::NResize, L"n-resize", 0xA088968D},
+ {FDE_CSSPropertyValue::ListItem, L"list-item", 0xA32382B8},
+ {FDE_CSSPropertyValue::Show, L"show", 0xA66C10C1},
+ {FDE_CSSPropertyValue::Currentcolor, L"currentColor", 0xA7883922},
+ {FDE_CSSPropertyValue::NoCloseQuote, L"no-close-quote", 0xA79CBFFB},
+ {FDE_CSSPropertyValue::VerticalLr, L"vertical-lr", 0xA8673F65},
+ {FDE_CSSPropertyValue::VerticalRl, L"vertical-rl", 0xA8675E25},
+ {FDE_CSSPropertyValue::Pointer, L"pointer", 0xA90929C1},
+ {FDE_CSSPropertyValue::XxSmall, L"xx-small", 0xADE1FC76},
+ {FDE_CSSPropertyValue::Bold, L"bold", 0xB18313A1},
+ {FDE_CSSPropertyValue::Both, L"both", 0xB1833CAD},
+ {FDE_CSSPropertyValue::SmallCaps, L"small-caps", 0xB299428D},
+ {FDE_CSSPropertyValue::Katakana, L"katakana", 0xB421A4BC},
+ {FDE_CSSPropertyValue::After, L"after", 0xB6B44172},
+ {FDE_CSSPropertyValue::Horizontal, L"horizontal", 0xB7732DEA},
+ {FDE_CSSPropertyValue::Dotted, L"dotted", 0xB88652A4},
+ {FDE_CSSPropertyValue::Disc, L"disc", 0xBEBC18C3},
+ {FDE_CSSPropertyValue::Georgian, L"georgian", 0xBEF99E8C},
+ {FDE_CSSPropertyValue::Inline, L"inline", 0xC02D649F},
+ {FDE_CSSPropertyValue::Overline, L"overline", 0xC0EC9FA4},
+ {FDE_CSSPropertyValue::Wait, L"wait", 0xC1613BB5},
+ {FDE_CSSPropertyValue::BreakAll, L"break-all", 0xC3145BAB},
+ {FDE_CSSPropertyValue::UpperAlpha, L"upper-alpha", 0xC52D4A9F},
+ {FDE_CSSPropertyValue::Capitalize, L"capitalize", 0xC5321D46},
+ {FDE_CSSPropertyValue::Nowrap, L"nowrap", 0xC7994417},
+ {FDE_CSSPropertyValue::TextBottom, L"text-bottom", 0xC7D08D87},
+ {FDE_CSSPropertyValue::NoOpenQuote, L"no-open-quote", 0xC8CD7877},
+ {FDE_CSSPropertyValue::Groove, L"groove", 0xCB24A412},
+ {FDE_CSSPropertyValue::Progress, L"progress", 0xCD1D9835},
+ {FDE_CSSPropertyValue::Larger, L"larger", 0xCD3C409D},
+ {FDE_CSSPropertyValue::CloseQuote, L"close-quote", 0xCF8696D1},
+ {FDE_CSSPropertyValue::TableCell, L"table-cell", 0xCFB5E595},
+ {FDE_CSSPropertyValue::PreLine, L"pre-line", 0xD04FEDBC},
+ {FDE_CSSPropertyValue::Absolute, L"absolute", 0xD0B2D55F},
+ {FDE_CSSPropertyValue::InlineTable, L"inline-table", 0xD131F494},
+ {FDE_CSSPropertyValue::BidiOverride, L"bidi-override", 0xD161FDE5},
+ {FDE_CSSPropertyValue::InlineBlock, L"inline-block", 0xD26A8BD7},
+ {FDE_CSSPropertyValue::Inset, L"inset", 0xD6F23243},
+ {FDE_CSSPropertyValue::Crosshair, L"crosshair", 0xD6F8018E},
+ {FDE_CSSPropertyValue::UpperLatin, L"upper-latin", 0xD9D60531},
+ {FDE_CSSPropertyValue::Help, L"help", 0xDA002969},
+ {FDE_CSSPropertyValue::Hide, L"hide", 0xDA69395A},
+ {FDE_CSSPropertyValue::Uppercase, L"uppercase", 0xDAD595A8},
+ {FDE_CSSPropertyValue::SResize, L"s-resize", 0xDB3AADF2},
+ {FDE_CSSPropertyValue::Table, L"table", 0xDB9BE968},
+ {FDE_CSSPropertyValue::Blink, L"blink", 0xDC36E390},
+ {FDE_CSSPropertyValue::Block, L"block", 0xDCD480AB},
+ {FDE_CSSPropertyValue::Start, L"start", 0xE1D9D5AE},
+ {FDE_CSSPropertyValue::TableColumnGroup, L"table-column-group", 0xE2258EFD},
+ {FDE_CSSPropertyValue::Italic, L"italic", 0xE31D5396},
+ {FDE_CSSPropertyValue::LineThrough, L"line-through", 0xE4C5A276},
+ {FDE_CSSPropertyValue::KeepAll, L"keep-all", 0xE704A72B},
+ {FDE_CSSPropertyValue::LowerAlpha, L"lower-alpha", 0xECB75A3C},
+ {FDE_CSSPropertyValue::RunIn, L"run-in", 0xEEC930B9},
+ {FDE_CSSPropertyValue::Square, L"square", 0xEF85D351},
+ {FDE_CSSPropertyValue::XLarge, L"x-large", 0xF008E390},
+ {FDE_CSSPropertyValue::Large, L"large", 0xF4434FCB},
+ {FDE_CSSPropertyValue::Before, L"before", 0xF4FFCE73},
+ {FDE_CSSPropertyValue::Left, L"left", 0xF5AD782B},
+ {FDE_CSSPropertyValue::TextTop, L"text-top", 0xFCB58D45},
+ {FDE_CSSPropertyValue::RubyText, L"ruby-text", 0xFCC77174},
+ {FDE_CSSPropertyValue::NoDisplay, L"no-display", 0xFE482860},
};
+const int32_t g_iCSSPropertyValueCount =
+ sizeof(g_FDE_CSSPropertyValues) / sizeof(FDE_CSSPropertyValueTable);
+
static const FDE_CSSMEDIATYPETABLE g_FDE_CSSMediaTypes[] = {
{0xF09, 0x02}, {0x4880, 0x20}, {0x536A, 0x80},
{0x741D, 0x10}, {0x76ED, 0x08}, {0x7CFB, 0x01},
{0x9578, 0x04}, {0xC8E1, 0x40}, {0xD0F9, 0xFF},
};
-static const FDE_CSSLENGTHUNITTABLE g_FDE_CSSLengthUnits[] = {
- {0x0672, 3}, {0x067D, 4}, {0x1AF7, 8}, {0x2F7A, 7},
- {0x3ED3, 10}, {0x3EE4, 9}, {0x3EE8, 5}, {0xFC30, 6},
+static const FDE_CSSLengthUnitTable g_FDE_CSSLengthUnits[] = {
+ {0x0672, FDE_CSSPrimitiveType::EMS},
+ {0x067D, FDE_CSSPrimitiveType::EXS},
+ {0x1AF7, FDE_CSSPrimitiveType::Inches},
+ {0x2F7A, FDE_CSSPrimitiveType::MilliMeters},
+ {0x3ED3, FDE_CSSPrimitiveType::Picas},
+ {0x3EE4, FDE_CSSPrimitiveType::Points},
+ {0x3EE8, FDE_CSSPrimitiveType::Pixels},
+ {0xFC30, FDE_CSSPrimitiveType::CentiMeters},
};
static const FDE_CSSCOLORTABLE g_FDE_CSSColors[] = {
{0x031B47FE, 0xff000080}, {0x0BB8DF5B, 0xffff0000},
@@ -553,18 +567,21 @@ static const FDE_CSSCOLORTABLE g_FDE_CSSColors[] = {
{0xDB64391D, 0xff000000}, {0xF616D507, 0xff00ff00},
{0xF6EFFF31, 0xff008000},
};
-static const FDE_CSSPSEUDOTABLE g_FDE_CSSPseudoType[] = {
- {FDE_CSSPSEUDO_After, L":after", 0x16EE1FEC},
- {FDE_CSSPSEUDO_Before, L":before", 0x7DCDDE2D},
+
+static const FDE_CSSPseudoTable g_FDE_CSSPseudoType[] = {
+ {FDE_CSSPseudo::After, L":after", 0x16EE1FEC},
+ {FDE_CSSPseudo::Before, L":before", 0x7DCDDE2D},
};
-const FDE_CSSPSEUDOTABLE* FDE_GetCSSPseudoByEnum(FDE_CSSPSEUDO ePseudo) {
- return ePseudo < FDE_CSSPSEUDO_NONE ? g_FDE_CSSPseudoType + ePseudo : nullptr;
+
+const FDE_CSSPseudoTable* FDE_GetCSSPseudoByEnum(FDE_CSSPseudo ePseudo) {
+ return g_FDE_CSSPseudoType + static_cast<int>(ePseudo);
}
-const FDE_CSSPROPERTYTABLE* FDE_GetCSSPropertyByName(
+
+const FDE_CSSPropertyTable* FDE_GetCSSPropertyByName(
const CFX_WideStringC& wsName) {
ASSERT(!wsName.IsEmpty());
uint32_t dwHash = FX_HashCode_GetW(wsName, true);
- int32_t iEnd = FDE_CSSPROPERTY_MAX - 1;
+ int32_t iEnd = g_iCSSPropertyCount;
int32_t iMid, iStart = 0;
uint32_t dwMid;
do {
@@ -580,15 +597,16 @@ const FDE_CSSPROPERTYTABLE* FDE_GetCSSPropertyByName(
} while (iStart <= iEnd);
return nullptr;
}
-const FDE_CSSPROPERTYTABLE* FDE_GetCSSPropertyByEnum(FDE_CSSPROPERTY eName) {
- return (eName < FDE_CSSPROPERTY_MAX) ? (g_FDE_CSSProperties + eName)
- : nullptr;
+
+const FDE_CSSPropertyTable* FDE_GetCSSPropertyByEnum(FDE_CSSProperty eName) {
+ return g_FDE_CSSProperties + static_cast<int>(eName);
}
-const FDE_CSSPROPERTYVALUETABLE* FDE_GetCSSPropertyValueByName(
+
+const FDE_CSSPropertyValueTable* FDE_GetCSSPropertyValueByName(
const CFX_WideStringC& wsName) {
ASSERT(!wsName.IsEmpty());
uint32_t dwHash = FX_HashCode_GetW(wsName, true);
- int32_t iEnd = FDE_CSSPROPERTYVALUE_MAX - 1;
+ int32_t iEnd = g_iCSSPropertyValueCount;
int32_t iMid, iStart = 0;
uint32_t dwMid;
do {
@@ -604,11 +622,12 @@ const FDE_CSSPROPERTYVALUETABLE* FDE_GetCSSPropertyValueByName(
} while (iStart <= iEnd);
return nullptr;
}
-const FDE_CSSPROPERTYVALUETABLE* FDE_GetCSSPropertyValueByEnum(
- FDE_CSSPROPERTYVALUE eName) {
- return (eName < FDE_CSSPROPERTYVALUE_MAX) ? (g_FDE_CSSPropertyValues + eName)
- : nullptr;
+
+const FDE_CSSPropertyValueTable* FDE_GetCSSPropertyValueByEnum(
+ FDE_CSSPropertyValue eName) {
+ return g_FDE_CSSPropertyValues + static_cast<int>(eName);
}
+
const FDE_CSSMEDIATYPETABLE* FDE_GetCSSMediaTypeByName(
const CFX_WideStringC& wsName) {
ASSERT(!wsName.IsEmpty());
@@ -631,12 +650,12 @@ const FDE_CSSMEDIATYPETABLE* FDE_GetCSSMediaTypeByName(
return nullptr;
}
-const FDE_CSSLENGTHUNITTABLE* FDE_GetCSSLengthUnitByName(
+const FDE_CSSLengthUnitTable* FDE_GetCSSLengthUnitByName(
const CFX_WideStringC& wsName) {
ASSERT(!wsName.IsEmpty());
uint16_t wHash = FX_HashCode_GetW(wsName, true);
int32_t iEnd =
- sizeof(g_FDE_CSSLengthUnits) / sizeof(FDE_CSSLENGTHUNITTABLE) - 1;
+ sizeof(g_FDE_CSSLengthUnits) / sizeof(FDE_CSSLengthUnitTable) - 1;
int32_t iMid, iStart = 0;
uint16_t wMid;
do {
@@ -676,7 +695,7 @@ const FDE_CSSCOLORTABLE* FDE_GetCSSColorByName(const CFX_WideStringC& wsName) {
bool FDE_ParseCSSNumber(const FX_WCHAR* pszValue,
int32_t iValueLen,
FX_FLOAT& fValue,
- FDE_CSSPRIMITIVETYPE& eUnit) {
+ FDE_CSSPrimitiveType& eUnit) {
ASSERT(pszValue && iValueLen > 0);
int32_t iUsedLen = 0;
fValue = FXSYS_wcstof(pszValue, iValueLen, &iUsedLen);
@@ -685,14 +704,14 @@ bool FDE_ParseCSSNumber(const FX_WCHAR* pszValue,
iValueLen -= iUsedLen;
pszValue += iUsedLen;
- eUnit = FDE_CSSPRIMITIVETYPE_Number;
+ eUnit = FDE_CSSPrimitiveType::Number;
if (iValueLen >= 1 && *pszValue == '%') {
- eUnit = FDE_CSSPRIMITIVETYPE_Percent;
+ eUnit = FDE_CSSPrimitiveType::Percent;
} else if (iValueLen == 2) {
- const FDE_CSSLENGTHUNITTABLE* pUnit =
+ const FDE_CSSLengthUnitTable* pUnit =
FDE_GetCSSLengthUnitByName(CFX_WideStringC(pszValue, 2));
if (pUnit)
- eUnit = (FDE_CSSPRIMITIVETYPE)pUnit->wValue;
+ eUnit = pUnit->wValue;
}
return true;
}
@@ -761,17 +780,17 @@ bool FDE_ParseCSSColor(const FX_WCHAR* pszValue,
uint8_t rgb[3] = {0};
FX_FLOAT fValue;
- FDE_CSSPRIMITIVETYPE eType;
+ FDE_CSSPrimitiveType eType;
CFDE_CSSValueListParser list(pszValue + 4, iValueLen - 5, ',');
for (int32_t i = 0; i < 3; ++i) {
if (!list.NextValue(eType, pszValue, iValueLen))
return false;
- if (eType != FDE_CSSPRIMITIVETYPE_Number)
+ if (eType != FDE_CSSPrimitiveType::Number)
return false;
if (!FDE_ParseCSSNumber(pszValue, iValueLen, fValue, eType))
return false;
- rgb[i] = eType == FDE_CSSPRIMITIVETYPE_Percent
+ rgb[i] = eType == FDE_CSSPrimitiveType::Percent
? FXSYS_round(fValue * 2.55f)
: FXSYS_round(fValue);
}
@@ -802,7 +821,7 @@ int32_t CFDE_CSSValueList::CountValues() const {
IFDE_CSSValue* CFDE_CSSValueList::GetValue(int32_t index) const {
return m_ppList[index];
}
-bool CFDE_CSSValueListParser::NextValue(FDE_CSSPRIMITIVETYPE& eType,
+bool CFDE_CSSValueListParser::NextValue(FDE_CSSPrimitiveType& eType,
const FX_WCHAR*& pStart,
int32_t& iLength) {
while (m_pCur < m_pEnd && (*m_pCur <= ' ' || *m_pCur == m_Separator)) {
@@ -811,14 +830,14 @@ bool CFDE_CSSValueListParser::NextValue(FDE_CSSPRIMITIVETYPE& eType,
if (m_pCur >= m_pEnd) {
return false;
}
- eType = FDE_CSSPRIMITIVETYPE_Unknown;
+ eType = FDE_CSSPrimitiveType::Unknown;
pStart = m_pCur;
iLength = 0;
FX_WCHAR wch = *m_pCur;
if (wch == '#') {
iLength = SkipTo(' ');
if (iLength == 4 || iLength == 7) {
- eType = FDE_CSSPRIMITIVETYPE_RGB;
+ eType = FDE_CSSPrimitiveType::RGB;
}
} else if ((wch >= '0' && wch <= '9') || wch == '.' || wch == '-' ||
wch == '+') {
@@ -827,13 +846,13 @@ bool CFDE_CSSValueListParser::NextValue(FDE_CSSPRIMITIVETYPE& eType,
}
iLength = m_pCur - pStart;
if (iLength > 0) {
- eType = FDE_CSSPRIMITIVETYPE_Number;
+ eType = FDE_CSSPrimitiveType::Number;
}
} else if (wch == '\"' || wch == '\'') {
pStart++;
iLength = SkipTo(wch) - 1;
m_pCur++;
- eType = FDE_CSSPRIMITIVETYPE_String;
+ eType = FDE_CSSPrimitiveType::String;
} else if (m_pEnd - m_pCur > 5 && m_pCur[3] == '(') {
if (FXSYS_wcsnicmp(L"url", m_pCur, 3) == 0) {
wch = m_pCur[4];
@@ -846,15 +865,15 @@ bool CFDE_CSSValueListParser::NextValue(FDE_CSSPRIMITIVETYPE& eType,
iLength = SkipTo(')') - 4;
m_pCur++;
}
- eType = FDE_CSSPRIMITIVETYPE_URI;
+ eType = FDE_CSSPrimitiveType::URI;
} else if (FXSYS_wcsnicmp(L"rgb", m_pCur, 3) == 0) {
iLength = SkipTo(')') + 1;
m_pCur++;
- eType = FDE_CSSPRIMITIVETYPE_RGB;
+ eType = FDE_CSSPrimitiveType::RGB;
}
} else {
iLength = SkipTo(m_Separator, true, true);
- eType = FDE_CSSPRIMITIVETYPE_String;
+ eType = FDE_CSSPrimitiveType::String;
}
return m_pCur <= m_pEnd && iLength > 0;
}
@@ -908,62 +927,62 @@ CFDE_CSSPrimitiveValue::CFDE_CSSPrimitiveValue(
const CFDE_CSSPrimitiveValue& src) = default;
CFDE_CSSPrimitiveValue::CFDE_CSSPrimitiveValue(FX_ARGB color)
- : m_eType(FDE_CSSPRIMITIVETYPE_RGB), m_dwColor(color) {}
+ : m_eType(FDE_CSSPrimitiveType::RGB), m_dwColor(color) {}
-CFDE_CSSPrimitiveValue::CFDE_CSSPrimitiveValue(FDE_CSSPROPERTYVALUE eValue)
- : m_eType(FDE_CSSPRIMITIVETYPE_Enum), m_eEnum(eValue) {}
+CFDE_CSSPrimitiveValue::CFDE_CSSPrimitiveValue(FDE_CSSPropertyValue eValue)
+ : m_eType(FDE_CSSPrimitiveType::Enum), m_eEnum(eValue) {}
-CFDE_CSSPrimitiveValue::CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE eType,
+CFDE_CSSPrimitiveValue::CFDE_CSSPrimitiveValue(FDE_CSSPrimitiveType eType,
FX_FLOAT fValue)
: m_eType(eType), m_fNumber(fValue) {}
-CFDE_CSSPrimitiveValue::CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE eType,
+CFDE_CSSPrimitiveValue::CFDE_CSSPrimitiveValue(FDE_CSSPrimitiveType eType,
const FX_WCHAR* pValue)
: m_eType(eType), m_pString(pValue) {
ASSERT(m_pString);
}
CFDE_CSSPrimitiveValue::CFDE_CSSPrimitiveValue(CFDE_CSSFunction* pFunction)
- : m_eType(FDE_CSSPRIMITIVETYPE_Function), m_pFunction(pFunction) {}
+ : m_eType(FDE_CSSPrimitiveType::Function), m_pFunction(pFunction) {}
-FDE_CSSPRIMITIVETYPE CFDE_CSSPrimitiveValue::GetPrimitiveType() const {
+FDE_CSSPrimitiveType CFDE_CSSPrimitiveValue::GetPrimitiveType() const {
return m_eType;
}
FX_ARGB CFDE_CSSPrimitiveValue::GetRGBColor() const {
- ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_RGB);
+ ASSERT(m_eType == FDE_CSSPrimitiveType::RGB);
return m_dwColor;
}
FX_FLOAT CFDE_CSSPrimitiveValue::GetFloat() const {
- ASSERT(m_eType >= FDE_CSSPRIMITIVETYPE_Number &&
- m_eType <= FDE_CSSPRIMITIVETYPE_PC);
+ ASSERT(m_eType >= FDE_CSSPrimitiveType::Number &&
+ m_eType <= FDE_CSSPrimitiveType::Picas);
return m_fNumber;
}
const FX_WCHAR* CFDE_CSSPrimitiveValue::GetString(int32_t& iLength) const {
- ASSERT(m_eType >= FDE_CSSPRIMITIVETYPE_String &&
- m_eType <= FDE_CSSPRIMITIVETYPE_URI);
+ ASSERT(m_eType >= FDE_CSSPrimitiveType::String &&
+ m_eType <= FDE_CSSPrimitiveType::URI);
iLength = FXSYS_wcslen(m_pString);
return m_pString;
}
-FDE_CSSPROPERTYVALUE CFDE_CSSPrimitiveValue::GetEnum() const {
- ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Enum);
+FDE_CSSPropertyValue CFDE_CSSPrimitiveValue::GetEnum() const {
+ ASSERT(m_eType == FDE_CSSPrimitiveType::Enum);
return m_eEnum;
}
const FX_WCHAR* CFDE_CSSPrimitiveValue::GetFuncName() const {
- ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function);
+ ASSERT(m_eType == FDE_CSSPrimitiveType::Function);
return m_pFunction->GetFuncName();
}
int32_t CFDE_CSSPrimitiveValue::CountArgs() const {
- ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function);
+ ASSERT(m_eType == FDE_CSSPrimitiveType::Function);
return m_pFunction->CountArgs();
}
IFDE_CSSValue* CFDE_CSSPrimitiveValue::GetArgs(int32_t index) const {
- ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function);
+ ASSERT(m_eType == FDE_CSSPrimitiveType::Function);
return m_pFunction->GetArgs(index);
}