📄 cssprimitivevaluemappings.h
字号:
case CSSValueBoth: return CBOTH; default: ASSERT_NOT_REACHED(); return CNONE; }}template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ECursor e) : m_type(CSS_IDENT){ switch (e) { case CURSOR_AUTO: m_value.ident = CSSValueAuto; break; case CURSOR_CROSS: m_value.ident = CSSValueCrosshair; break; case CURSOR_DEFAULT: m_value.ident = CSSValueDefault; break; case CURSOR_POINTER: m_value.ident = CSSValuePointer; break; case CURSOR_MOVE: m_value.ident = CSSValueMove; break; case CURSOR_CELL: m_value.ident = CSSValueCell; break; case CURSOR_VERTICAL_TEXT: m_value.ident = CSSValueVerticalText; break; case CURSOR_CONTEXT_MENU: m_value.ident = CSSValueContextMenu; break; case CURSOR_ALIAS: m_value.ident = CSSValueAlias; break; case CURSOR_COPY: m_value.ident = CSSValueCopy; break; case CURSOR_NONE: m_value.ident = CSSValueNone; break; case CURSOR_PROGRESS: m_value.ident = CSSValueProgress; break; case CURSOR_NO_DROP: m_value.ident = CSSValueNoDrop; break; case CURSOR_NOT_ALLOWED: m_value.ident = CSSValueNotAllowed; break; case CURSOR_WEBKIT_ZOOM_IN: m_value.ident = CSSValueWebkitZoomIn; break; case CURSOR_WEBKIT_ZOOM_OUT: m_value.ident = CSSValueWebkitZoomOut; break; case CURSOR_E_RESIZE: m_value.ident = CSSValueEResize; break; case CURSOR_NE_RESIZE: m_value.ident = CSSValueNeResize; break; case CURSOR_NW_RESIZE: m_value.ident = CSSValueNwResize; break; case CURSOR_N_RESIZE: m_value.ident = CSSValueNResize; break; case CURSOR_SE_RESIZE: m_value.ident = CSSValueSeResize; break; case CURSOR_SW_RESIZE: m_value.ident = CSSValueSwResize; break; case CURSOR_S_RESIZE: m_value.ident = CSSValueSResize; break; case CURSOR_W_RESIZE: m_value.ident = CSSValueWResize; break; case CURSOR_EW_RESIZE: m_value.ident = CSSValueEwResize; break; case CURSOR_NS_RESIZE: m_value.ident = CSSValueNsResize; break; case CURSOR_NESW_RESIZE: m_value.ident = CSSValueNeswResize; break; case CURSOR_NWSE_RESIZE: m_value.ident = CSSValueNwseResize; break; case CURSOR_COL_RESIZE: m_value.ident = CSSValueColResize; break; case CURSOR_ROW_RESIZE: m_value.ident = CSSValueRowResize; break; case CURSOR_TEXT: m_value.ident = CSSValueText; break; case CURSOR_WAIT: m_value.ident = CSSValueWait; break; case CURSOR_HELP: m_value.ident = CSSValueHelp; break; case CURSOR_ALL_SCROLL: m_value.ident = CSSValueAllScroll; break; case CURSOR_WEBKIT_GRAB: m_value.ident = CSSValueWebkitGrab; break; case CURSOR_WEBKIT_GRABBING: m_value.ident = CSSValueWebkitGrabbing; break; }}template<> inline CSSPrimitiveValue::operator ECursor() const{ if (m_value.ident == CSSValueCopy) return CURSOR_COPY; if (m_value.ident == CSSValueNone) return CURSOR_NONE; return static_cast<ECursor>(m_value.ident - CSSValueAuto);}template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EDisplay e) : m_type(CSS_IDENT){ switch (e) { case INLINE: m_value.ident = CSSValueInline; break; case BLOCK: m_value.ident = CSSValueBlock; break; case LIST_ITEM: m_value.ident = CSSValueListItem; break; case RUN_IN: m_value.ident = CSSValueRunIn; break; case COMPACT: m_value.ident = CSSValueCompact; break; case INLINE_BLOCK: m_value.ident = CSSValueInlineBlock; break; case TABLE: m_value.ident = CSSValueTable; break; case INLINE_TABLE: m_value.ident = CSSValueInlineTable; break; case TABLE_ROW_GROUP: m_value.ident = CSSValueTableRowGroup; break; case TABLE_HEADER_GROUP: m_value.ident = CSSValueTableHeaderGroup; break; case TABLE_FOOTER_GROUP: m_value.ident = CSSValueTableFooterGroup; break; case TABLE_ROW: m_value.ident = CSSValueTableRow; break; case TABLE_COLUMN_GROUP: m_value.ident = CSSValueTableColumnGroup; break; case TABLE_COLUMN: m_value.ident = CSSValueTableColumn; break; case TABLE_CELL: m_value.ident = CSSValueTableCell; break; case TABLE_CAPTION: m_value.ident = CSSValueTableCaption; break; case BOX: m_value.ident = CSSValueWebkitBox; break; case INLINE_BOX: m_value.ident = CSSValueWebkitInlineBox; break; case NONE: m_value.ident = CSSValueNone; break; }}template<> inline CSSPrimitiveValue::operator EDisplay() const{ if (m_value.ident == CSSValueNone) return NONE; return static_cast<EDisplay>(m_value.ident - CSSValueInline);}template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EEmptyCell e) : m_type(CSS_IDENT){ switch (e) { case SHOW: m_value.ident = CSSValueShow; break; case HIDE: m_value.ident = CSSValueHide; break; }}template<> inline CSSPrimitiveValue::operator EEmptyCell() const{ switch (m_value.ident) { case CSSValueShow: return SHOW; case CSSValueHide: return HIDE; default: ASSERT_NOT_REACHED(); return SHOW; }}template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFloat e) : m_type(CSS_IDENT){ switch (e) { case FNONE: m_value.ident = CSSValueNone; break; case FLEFT: m_value.ident = CSSValueLeft; break; case FRIGHT: m_value.ident = CSSValueRight; break; }}template<> inline CSSPrimitiveValue::operator EFloat() const{ switch (m_value.ident) { case CSSValueLeft: return FLEFT; case CSSValueRight: return FRIGHT; case CSSValueNone: case CSSValueCenter: // Non-standard CSS value return FNONE; default: ASSERT_NOT_REACHED(); return FNONE; }}template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EKHTMLLineBreak e) : m_type(CSS_IDENT){ switch (e) { case LBNORMAL: m_value.ident = CSSValueNormal; break; case AFTER_WHITE_SPACE: m_value.ident = CSSValueAfterWhiteSpace; break; }}template<> inline CSSPrimitiveValue::operator EKHTMLLineBreak() const{ switch (m_value.ident) { case CSSValueAfterWhiteSpace: return AFTER_WHITE_SPACE; case CSSValueNormal: return LBNORMAL; default: ASSERT_NOT_REACHED(); return LBNORMAL; }}template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStylePosition e) : m_type(CSS_IDENT){ switch (e) { case OUTSIDE: m_value.ident = CSSValueOutside; break; case INSIDE: m_value.ident = CSSValueInside; break; }}template<> inline CSSPrimitiveValue::operator EListStylePosition() const{ return (EListStylePosition)(m_value.ident - CSSValueOutside);}template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStyleType e) : m_type(CSS_IDENT){ switch (e) { case LNONE: m_value.ident = CSSValueNone; break; case DISC: m_value.ident = CSSValueDisc; break; case CIRCLE: m_value.ident = CSSValueCircle; break; case SQUARE: m_value.ident = CSSValueSquare; break; case LDECIMAL: m_value.ident = CSSValueDecimal; break; case DECIMAL_LEADING_ZERO: m_value.ident = CSSValueDecimalLeadingZero; break; case LOWER_ROMAN: m_value.ident = CSSValueLowerRoman; break; case UPPER_ROMAN: m_value.ident = CSSValueUpperRoman; break; case LOWER_GREEK: m_value.ident = CSSValueLowerGreek; break; case LOWER_ALPHA: m_value.ident = CSSValueLowerAlpha; break; case LOWER_LATIN: m_value.ident = CSSValueLowerLatin; break; case UPPER_ALPHA: m_value.ident = CSSValueUpperAlpha; break; case UPPER_LATIN: m_value.ident = CSSValueUpperLatin; break; case HEBREW: m_value.ident = CSSValueHebrew; break; case ARMENIAN: m_value.ident = CSSValueArmenian; break; case GEORGIAN: m_value.ident = CSSValueGeorgian; break; case CJK_IDEOGRAPHIC: m_value.ident = CSSValueCjkIdeographic; break; case HIRAGANA: m_value.ident = CSSValueHiragana; break; case KATAKANA: m_value.ident = CSSValueKatakana; break; case HIRAGANA_IROHA: m_value.ident = CSSValueHiraganaIroha; break; case KATAKANA_IROHA: m_value.ident = CSSValueKatakanaIroha; break; }}template<> inline CSSPrimitiveValue::operator EListStyleType() const{ switch (m_value.ident) { case CSSValueNone: return LNONE; default: return static_cast<EListStyleType>(m_value.ident - CSSValueDisc); }}template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarginCollapse e) : m_type(CSS_IDENT){ switch (e) { case MCOLLAPSE: m_value.ident = CSSValueCollapse; break; case MSEPARATE: m_value.ident = CSSValueSeparate; break; case MDISCARD: m_value.ident = CSSValueDiscard; break; }}template<> inline CSSPrimitiveValue::operator EMarginCollapse() const{ switch (m_value.ident) { case CSSValueCollapse: return MCOLLAPSE; case CSSValueSeparate: return MSEPARATE; case CSSValueDiscard: return MDISCARD; default: ASSERT_NOT_REACHED(); return MCOLLAPSE; }}template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarqueeBehavior e) : m_type(CSS_IDENT){ switch (e) { case MNONE: m_value.ident = CSSValueNone; break; case MSCROLL: m_value.ident = CSSValueScroll; break; case MSLIDE: m_value.ident = CSSValueSlide; break; case MALTERNATE: m_value.ident = CSSValueAlternate; break; }}template<> inline CSSPrimitiveValue::operator EMarqueeBehavior() const{ switch (m_value.ident) { case CSSValueNone: return MNONE; case CSSValueScroll: return MSCROLL; case CSSValueSlide: return MSLIDE; case CSSValueAlternate: return MALTERNATE; default: ASSERT_NOT_REACHED(); return MNONE; }}template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarqueeDirection e) : m_type(CSS_IDENT){ switch (e) { case MFORWARD: m_value.ident = CSSValueForwards; break; case MBACKWARD: m_value.ident = CSSValueBackwards; break; case MAUTO: m_value.ident = CSSValueAuto; break; case MUP: m_value.ident = CSSValueUp; break; case MDOWN: m_value.ident = CSSValueDown; break; case MLEFT: m_value.ident = CSSValueLeft; break; case MRIGHT: m_value.ident = CSSValueRight; break; }}template<> inline CSSPrimitiveValue::operator EMarqueeDirection() const{ switch (m_value.ident) { case CSSValueForwards: return MFORWARD; case CSSValueBackwards: return MBACKWARD; case CSSValueAuto: return MAUTO; case CSSValueAhead: case CSSValueUp: // We don't support vertical languages, so AHEAD just maps to UP. return MUP; case CSSValueReverse: case CSSValueDown: // REVERSE just maps to DOWN, since we don't do vertical text. return MDOWN; case CSSValueLeft: return MLEFT; case CSSValueRight: return MRIGHT; default: ASSERT_NOT_REACHED(); return MAUTO; }}template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMatchNearestMailBlockquoteColor e) : m_type(CSS_IDENT){ switch (e) { case BCNORMAL: m_value.ident = CSSValueNormal; break; case MATCH: m_value.ident = CSSValueMatch; break; }}template<> inline CSSPrimitiveValue::operator EMatchNearestMailBlockquoteColor() const{ switch (m_value.ident) { case CSSValueNormal: return BCNORMAL; case CSSValueMatch: return MATCH; default: ASSERT_NOT_REACHED(); return BCNORMAL; }}template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ENBSPMode e) : m_type(CSS_IDENT){ switch (e) { case NBNORMAL: m_value.ident = CSSValueNormal; break; case SPACE: m_value.ident = CSSValueSpace; break; }}template<> inline CSSPrimitiveValue::operator ENBSPMode() const{ switch (m_value.ident) { case CSSValueSpace: return SPACE; case CSSValueNormal: return NBNORMAL; default: ASSERT_NOT_REACHED(); return NBNORMAL; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -