Created
March 14, 2012 12:40
-
-
Save anonymous/2036206 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Source/WebCore/css/CSSParser.cpp b/Source/WebCore/css/CSSParser.cpp | |
index 3dc4bc9..e3da51e 100644 | |
--- a/Source/WebCore/css/CSSParser.cpp | |
+++ b/Source/WebCore/css/CSSParser.cpp | |
@@ -479,6 +479,454 @@ static bool parseSimpleLengthValue(StylePropertySet* declaration, int propertyId | |
return true; | |
} | |
+ | |
+static inline bool propertyMatchKeyword(int propertyId, int id) | |
+{ | |
+ switch (propertyId) { | |
+ case CSSPropertyBorderCollapse: // collapse | separate | inherit | |
+ if (id == CSSValueCollapse || id == CSSValueSeparate) | |
+ return true; | |
+ break; | |
+ case CSSPropertyBorderTopStyle: // <border-style> | inherit | |
+ case CSSPropertyBorderRightStyle: // Defined as: none | hidden | dotted | dashed | | |
+ case CSSPropertyBorderBottomStyle: // solid | double | groove | ridge | inset | outset | |
+ case CSSPropertyBorderLeftStyle: | |
+ case CSSPropertyWebkitBorderAfterStyle: | |
+ case CSSPropertyWebkitBorderBeforeStyle: | |
+ case CSSPropertyWebkitBorderEndStyle: | |
+ case CSSPropertyWebkitBorderStartStyle: | |
+ case CSSPropertyWebkitColumnRuleStyle: | |
+ if (id >= CSSValueNone && id <= CSSValueDouble) | |
+ return true; | |
+ break; | |
+ case CSSPropertyBoxSizing: | |
+ if (id == CSSValueBorderBox || id == CSSValueContentBox) | |
+ return true; | |
+ break; | |
+ case CSSPropertyCaptionSide: // top | bottom | left | right | inherit | |
+ if (id == CSSValueLeft || id == CSSValueRight || id == CSSValueTop || id == CSSValueBottom) | |
+ return true; | |
+ break; | |
+ case CSSPropertyClear: // none | left | right | both | inherit | |
+ if (id == CSSValueNone || id == CSSValueLeft || id == CSSValueRight || id == CSSValueBoth) | |
+ return true; | |
+ break; | |
+ case CSSPropertyDirection: // ltr | rtl | inherit | |
+ if (id == CSSValueLtr || id == CSSValueRtl) | |
+ return true; | |
+ break; | |
+ case CSSPropertyDisplay: | |
+ // inline | block | list-item | run-in | inline-block | table | | |
+ // inline-table | table-row-group | table-header-group | table-footer-group | table-row | | |
+ // table-column-group | table-column | table-cell | table-caption | -webkit-box | -webkit-inline-box | none | inherit | |
+ // -webkit-flexbox | -webkit-inline-flexbox | -webkit-grid | -webkit-inline-grid | |
+ if ((id >= CSSValueInline && id <= CSSValueWebkitInlineFlexbox) || id == CSSValueNone) | |
+ return true; | |
+#if ENABLE(CSS_GRID_LAYOUT) | |
+ if (id == CSSValueWebkitGrid || id == CSSValueWebkitInlineGrid) | |
+ return true; | |
+ break; | |
+#endif | |
+ case CSSPropertyEmptyCells: // show | hide | inherit | |
+ if (id == CSSValueShow || id == CSSValueHide) | |
+ return true; | |
+ break; | |
+ case CSSPropertyFloat: // left | right | none | positioned | center (for buggy CSS, maps to none) | |
+ if (id == CSSValueLeft || id == CSSValueRight || id == CSSValueNone || id == CSSValueCenter || id == CSSValueWebkitPositioned) | |
+ return true; | |
+ break; | |
+ case CSSPropertyFontStyle: // normal | italic | oblique | inherit | |
+ if (id == CSSValueNormal || id == CSSValueItalic || id == CSSValueOblique) | |
+ return true; | |
+ break; | |
+ case CSSPropertyImageRendering: // auto | optimizeContrast | |
+ if (id == CSSValueAuto || id == CSSValueWebkitOptimizeContrast) | |
+ return true; | |
+ break; | |
+ case CSSPropertyListStylePosition: // inside | outside | inherit | |
+ if (id == CSSValueInside || id == CSSValueOutside) | |
+ return true; | |
+ break; | |
+ case CSSPropertyListStyleType: | |
+ // See section CSS_PROP_LIST_STYLE_TYPE of file CSSValueKeywords.in | |
+ // for the list of supported list-style-types. | |
+ if ((id >= CSSValueDisc && id <= CSSValueKatakanaIroha) || id == CSSValueNone) | |
+ return true; | |
+ break; | |
+ case CSSPropertyOutlineStyle: // (<border-style> except hidden) | auto | inherit | |
+ if (id == CSSValueAuto || id == CSSValueNone || (id >= CSSValueInset && id <= CSSValueDouble)) | |
+ return true; | |
+ break; | |
+ case CSSPropertyOverflowX: | |
+ case CSSPropertyOverflowY: // visible | hidden | scroll | auto | marquee | overlay | inherit | |
+ if (id == CSSValueVisible || id == CSSValueHidden || id == CSSValueScroll || id == CSSValueAuto || id == CSSValueOverlay || id == CSSValueWebkitMarquee) | |
+ return true; | |
+ break; | |
+ case CSSPropertyPointerEvents: | |
+ // none | visiblePainted | visibleFill | visibleStroke | visible | | |
+ // painted | fill | stroke | auto | all | inherit | |
+ if (id == CSSValueVisible || id == CSSValueNone || id == CSSValueAll || id == CSSValueAuto || (id >= CSSValueVisiblepainted && id <= CSSValueStroke)) | |
+ return true; | |
+ break; | |
+ case CSSPropertyPosition: | |
+ case CSSPropertyResize: // none | both | horizontal | vertical | auto | |
+ if (id == CSSValueNone || id == CSSValueBoth || id == CSSValueHorizontal || id == CSSValueVertical || id == CSSValueAuto) | |
+ return true; | |
+ break; | |
+ case CSSPropertySpeak: // none | normal | spell-out | digits | literal-punctuation | no-punctuation | inherit | |
+ if (id == CSSValueNone || id == CSSValueNormal || id == CSSValueSpellOut || id == CSSValueDigits || id == CSSValueLiteralPunctuation || id == CSSValueNoPunctuation) | |
+ return true; | |
+ break; | |
+ case CSSPropertyTableLayout: // auto | fixed | inherit | |
+ if (id == CSSValueAuto || id == CSSValueFixed) | |
+ return true; | |
+ break; | |
+ case CSSPropertyTextLineThroughMode: | |
+ case CSSPropertyTextOverlineMode: | |
+ case CSSPropertyTextUnderlineMode: | |
+ if (id == CSSValueContinuous || id == CSSValueSkipWhiteSpace) | |
+ return true; | |
+ break; | |
+ case CSSPropertyTextLineThroughStyle: | |
+ case CSSPropertyTextOverlineStyle: | |
+ case CSSPropertyTextUnderlineStyle: | |
+ if (id == CSSValueNone || id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDashed || id == CSSValueDotDash || id == CSSValueDotDotDash || id == CSSValueWave) | |
+ return true; | |
+ break; | |
+ case CSSPropertyTextOverflow: // clip | ellipsis | |
+ if (id == CSSValueClip || id == CSSValueEllipsis) | |
+ return true; | |
+ break; | |
+ case CSSPropertyTextRendering: // auto | optimizeSpeed | optimizeLegibility | geometricPrecision | |
+ if (id == CSSValueAuto || id == CSSValueOptimizespeed || id == CSSValueOptimizelegibility || id == CSSValueGeometricprecision) | |
+ return true; | |
+ break; | |
+ case CSSPropertyTextTransform: // capitalize | uppercase | lowercase | none | inherit | |
+ if ((id >= CSSValueCapitalize && id <= CSSValueLowercase) || id == CSSValueNone) | |
+ return true; | |
+ break; | |
+ case CSSPropertyVisibility: // visible | hidden | collapse | inherit | |
+ if (id == CSSValueVisible || id == CSSValueHidden || id == CSSValueCollapse) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitAppearance: | |
+ if ((id >= CSSValueCheckbox && id <= CSSValueTextarea) || id == CSSValueNone) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitBackfaceVisibility: | |
+ if (id == CSSValueVisible || id == CSSValueHidden) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitBorderFit: | |
+ if (id == CSSValueBorder || id == CSSValueLines) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitBoxAlign: | |
+ if (id == CSSValueStretch || id == CSSValueStart || id == CSSValueEnd || id == CSSValueCenter || id == CSSValueBaseline) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitBoxDirection: | |
+ if (id == CSSValueNormal || id == CSSValueReverse) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitBoxLines: | |
+ if (id == CSSValueSingle || id == CSSValueMultiple) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitBoxOrient: | |
+ if (id == CSSValueHorizontal || id == CSSValueVertical || id == CSSValueInlineAxis || id == CSSValueBlockAxis) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitBoxPack: | |
+ if (id == CSSValueStart || id == CSSValueEnd || id == CSSValueCenter || id == CSSValueJustify) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitColorCorrection: | |
+ if (id == CSSValueSrgb || id == CSSValueDefault) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitFlexAlign: | |
+ if (id == CSSValueStart || id == CSSValueEnd || id == CSSValueCenter || id == CSSValueBaseline || id == CSSValueStretch) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitFlexDirection: | |
+ if (id == CSSValueRow || id == CSSValueRowReverse || id == CSSValueColumn || id == CSSValueColumnReverse) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitFlexItemAlign: | |
+ if (id == CSSValueAuto || id == CSSValueStart || id == CSSValueEnd || id == CSSValueCenter || id == CSSValueBaseline || id == CSSValueStretch) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitFlexPack: | |
+ if (id == CSSValueStart || id == CSSValueEnd || id == CSSValueCenter || id == CSSValueJustify || id == CSSValueDistribute) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitFontKerning: | |
+ if (id == CSSValueAuto || id == CSSValueNormal || id == CSSValueNone) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitFontSmoothing: | |
+ if (id == CSSValueAuto || id == CSSValueNone || id == CSSValueAntialiased || id == CSSValueSubpixelAntialiased) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitHyphens: | |
+ if (id == CSSValueNone || id == CSSValueManual || id == CSSValueAuto) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitLineAlign: | |
+ if (id == CSSValueNone || id == CSSValueEdges) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitLineBreak: // normal | after-white-space | |
+ if (id == CSSValueNormal || id == CSSValueAfterWhiteSpace) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitLineSnap: | |
+ if (id == CSSValueNone || id == CSSValueBaseline || id == CSSValueContain) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitMarginAfterCollapse: | |
+ case CSSPropertyWebkitMarginBeforeCollapse: | |
+ case CSSPropertyWebkitMarginBottomCollapse: | |
+ case CSSPropertyWebkitMarginTopCollapse: | |
+ if (id == CSSValueCollapse || id == CSSValueSeparate || id == CSSValueDiscard) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitMarqueeDirection: | |
+ if (id == CSSValueForwards || id == CSSValueBackwards || id == CSSValueAhead || id == CSSValueReverse || id == CSSValueLeft || id == CSSValueRight || id == CSSValueDown || | |
+ id == CSSValueUp || id == CSSValueAuto) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitMarqueeStyle: | |
+ if (id == CSSValueNone || id == CSSValueSlide || id == CSSValueScroll || id == CSSValueAlternate) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitMatchNearestMailBlockquoteColor: // normal | match | |
+ if (id == CSSValueNormal || id == CSSValueMatch) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitNbspMode: // normal | space | |
+ if (id == CSSValueNormal || id == CSSValueSpace) | |
+ return true; | |
+ break; | |
+#if ENABLE(OVERFLOW_SCROLLING) | |
+ case CSSPropertyWebkitOverflowScrolling: | |
+ if (id == CSSValueAuto || id == CSSValueTouch) | |
+ return true; | |
+ break; | |
+#endif | |
+ case CSSPropertyWebkitPrintColorAdjust: | |
+ if (id == CSSValueExact || id == CSSValueEconomy) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitRtlOrdering: | |
+ if (id == CSSValueLogical || id == CSSValueVisual) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitTextCombine: | |
+ if (id == CSSValueNone || id == CSSValueHorizontal) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitTextEmphasisPosition: | |
+ if (id == CSSValueOver || id == CSSValueUnder) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitTextSecurity: | |
+ // disc | circle | square | none | inherit | |
+ if (id == CSSValueDisc || id == CSSValueCircle || id == CSSValueSquare|| id == CSSValueNone) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitTextSizeAdjust: | |
+ if (id == CSSValueAuto || id == CSSValueNone) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitTransformStyle: | |
+ if (id == CSSValueFlat || id == CSSValuePreserve3d) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitUserDrag: // auto | none | element | |
+ if (id == CSSValueAuto || id == CSSValueNone || id == CSSValueElement) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitUserModify: // read-only | read-write | |
+ if (id == CSSValueReadOnly || id == CSSValueReadWrite || id == CSSValueReadWritePlaintextOnly) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitUserSelect: // auto | none | text | |
+ if (id == CSSValueAuto || id == CSSValueNone || id == CSSValueText) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitWrapFlow: | |
+ if (id == CSSValueAuto || id == CSSValueBoth || id == CSSValueLeft || id == CSSValueRight || id == CSSValueMaximum || id == CSSValueClear) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitWrapThrough: | |
+ if (id == CSSValueWrap || id == CSSValueNone) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWebkitWritingMode: | |
+ if (id >= CSSValueHorizontalTb && id <= CSSValueHorizontalBt) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWhiteSpace: // normal | pre | nowrap | inherit | |
+ if (id == CSSValueNormal || id == CSSValuePre || id == CSSValuePreWrap || id == CSSValuePreLine || id == CSSValueNowrap) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWordBreak: // normal | break-all | break-word (this is a custom extension) | |
+ if (id == CSSValueNormal || id == CSSValueBreakAll || id == CSSValueBreakWord) | |
+ return true; | |
+ break; | |
+ case CSSPropertyWordWrap: // normal | break-word | |
+ if (id == CSSValueNormal || id == CSSValueBreakWord) | |
+ return true; | |
+ break; | |
+ default: | |
+ return false; | |
+ } | |
+ return false; | |
+} | |
+ | |
+static inline bool isKeywordPropertyID(int propertyId) | |
+{ | |
+ switch (propertyId) { | |
+ case CSSPropertyPosition: | |
+ case CSSPropertyEmptyCells: | |
+ case CSSPropertyWhiteSpace: | |
+ case CSSPropertyCaptionSide: | |
+ case CSSPropertyBorderCollapse: | |
+ case CSSPropertyVisibility: | |
+ case CSSPropertyOverflowX: | |
+ case CSSPropertyOverflowY: | |
+ case CSSPropertyListStylePosition: | |
+ case CSSPropertyDirection: | |
+ case CSSPropertyFloat: | |
+ case CSSPropertyClear: | |
+ case CSSPropertyWordBreak: | |
+ case CSSPropertyWordWrap: | |
+ case CSSPropertySpeak: | |
+ case CSSPropertyFontStyle: | |
+ case CSSPropertyTableLayout: | |
+ case CSSPropertyWebkitBoxAlign: | |
+ case CSSPropertyWebkitBoxDirection: | |
+ case CSSPropertyWebkitBoxLines: | |
+ case CSSPropertyWebkitBoxOrient: | |
+ case CSSPropertyWebkitBoxPack: | |
+ case CSSPropertyBoxSizing: | |
+ case CSSPropertyWebkitColorCorrection: | |
+ case CSSPropertyWebkitFlexPack: | |
+ case CSSPropertyWebkitFlexAlign: | |
+ case CSSPropertyWebkitFlexItemAlign: | |
+ case CSSPropertyWebkitFlexDirection: | |
+ case CSSPropertyWebkitMarqueeDirection: | |
+ case CSSPropertyWebkitMarqueeStyle: | |
+ case CSSPropertyWebkitUserDrag: | |
+ case CSSPropertyWebkitUserModify: | |
+ case CSSPropertyWebkitUserSelect: | |
+ case CSSPropertyTextOverflow: | |
+ case CSSPropertyWebkitTransformStyle: | |
+ case CSSPropertyWebkitBackfaceVisibility: | |
+ case CSSPropertyWebkitPrintColorAdjust: | |
+ case CSSPropertyWebkitMarginBeforeCollapse: | |
+ case CSSPropertyWebkitMarginAfterCollapse: | |
+ case CSSPropertyWebkitMarginTopCollapse: | |
+ case CSSPropertyWebkitMarginBottomCollapse: | |
+ case CSSPropertyTextLineThroughMode: | |
+ case CSSPropertyTextOverlineMode: | |
+ case CSSPropertyTextUnderlineMode: | |
+ case CSSPropertyTextLineThroughStyle: | |
+ case CSSPropertyTextOverlineStyle: | |
+ case CSSPropertyTextUnderlineStyle: | |
+ case CSSPropertyTextRendering: | |
+ case CSSPropertyResize: | |
+ case CSSPropertyImageRendering: | |
+ case CSSPropertyWebkitTextSizeAdjust: | |
+ case CSSPropertyWebkitRtlOrdering: | |
+ case CSSPropertyWebkitNbspMode: | |
+ case CSSPropertyWebkitLineBreak: | |
+ case CSSPropertyWebkitMatchNearestMailBlockquoteColor: | |
+ case CSSPropertyWebkitHyphens: | |
+ case CSSPropertyWebkitLineSnap: | |
+ case CSSPropertyWebkitLineAlign: | |
+ case CSSPropertyWebkitBorderFit: | |
+ case CSSPropertyWebkitTextSecurity: | |
+ case CSSPropertyWebkitFontSmoothing: | |
+#if ENABLE(OVERFLOW_SCROLLING) | |
+ case CSSPropertyWebkitOverflowScrolling: | |
+#endif | |
+ case CSSPropertyWebkitTextCombine: | |
+ case CSSPropertyWebkitTextEmphasisPosition: | |
+ case CSSPropertyWebkitFontKerning: | |
+ case CSSPropertyWebkitWrapFlow: | |
+ case CSSPropertyWebkitWrapThrough: | |
+ case CSSPropertyBorderTopStyle: | |
+ case CSSPropertyBorderRightStyle: | |
+ case CSSPropertyBorderBottomStyle: | |
+ case CSSPropertyBorderLeftStyle: | |
+ case CSSPropertyWebkitBorderStartStyle: | |
+ case CSSPropertyWebkitBorderEndStyle: | |
+ case CSSPropertyWebkitBorderBeforeStyle: | |
+ case CSSPropertyWebkitBorderAfterStyle: | |
+ case CSSPropertyWebkitColumnRuleStyle: | |
+ case CSSPropertyListStyleType: | |
+ case CSSPropertyDisplay: | |
+ case CSSPropertyTextTransform: | |
+ case CSSPropertyOutlineStyle: | |
+ case CSSPropertyWebkitAppearance: | |
+ case CSSPropertyPointerEvents: | |
+ case CSSPropertyWebkitWritingMode: | |
+ return true; | |
+ default: | |
+ return false; | |
+ } | |
+} | |
+ | |
+static bool parseKeywordValue(StylePropertySet* declaration, int propertyId, const String& string, bool important, CSSStyleSheet* contextStyleSheet) | |
+{ | |
+ if (!string.length()) | |
+ return false; | |
+ | |
+ if (!isKeywordPropertyID(propertyId)) | |
+ return false; | |
+ | |
+ CSSParserString cssString; | |
+ cssString.characters = const_cast<UChar*>(string.characters()); | |
+ cssString.length = string.length(); | |
+ int valueID = cssValueKeywordID(cssString); | |
+ | |
+ if (!valueID) | |
+ return false; | |
+ | |
+ Document* document = contextStyleSheet->findDocument(); | |
+ RefPtr<CSSValue> value; | |
+ CSSValuePool* cssValuePool = document ? document->cssValuePool().get() : 0; | |
+ if (valueID == CSSValueInherit) { | |
+ if (cssValuePool) | |
+ value = cssValuePool->createInheritedValue(); | |
+ else | |
+ value = CSSInheritedValue::create(); | |
+ declaration->addParsedProperty(CSSProperty(propertyId, value.release(), important)); | |
+ return true; | |
+ } | |
+ if (valueID == CSSValueInitial) { | |
+ if (cssValuePool) | |
+ value = cssValuePool->createExplicitInitialValue(); | |
+ else | |
+ value = CSSInitialValue::createExplicit(); | |
+ declaration->addParsedProperty(CSSProperty(propertyId, value.release(), important)); | |
+ return true; | |
+ } | |
+ | |
+ if (!propertyMatchKeyword(propertyId, valueID)) | |
+ return false; | |
+ | |
+ if (document) | |
+ value = cssValuePool->createIdentifierValue(valueID); | |
+ else | |
+ value = CSSPrimitiveValue::createIdentifier(valueID); | |
+ declaration->addParsedProperty(CSSProperty(propertyId, value.release(), important)); | |
+ return true; | |
+} | |
+ | |
PassRefPtr<CSSValueList> CSSParser::parseFontFaceValue(const AtomicString& string, CSSStyleSheet* contextStyleSheet) | |
{ | |
RefPtr<StylePropertySet> dummyStyle = StylePropertySet::create(); | |
@@ -493,6 +941,8 @@ bool CSSParser::parseValue(StylePropertySet* declaration, int propertyId, const | |
return true; | |
if (parseColorValue(declaration, propertyId, string, important, strict, contextStyleSheet)) | |
return true; | |
+ if (parseKeywordValue(declaration, propertyId, string, important, contextStyleSheet)) | |
+ return true; | |
CSSParser parser(strict); | |
return parser.parseValue(declaration, propertyId, string, important, contextStyleSheet); | |
} | |
@@ -930,6 +1380,21 @@ bool CSSParser::parseValue(int propId, bool important) | |
bool validPrimitive = false; | |
RefPtr<CSSValue> parsedValue; | |
+ if (id && isKeywordPropertyID(propId)) { | |
+ | |
+ if (!propertyMatchKeyword(propId, id)) | |
+ return false; | |
+ | |
+ parsedValue = parseValidPrimitive(id, value); | |
+ m_valueList->next(); | |
+ ASSERT(!m_parsedCalculation); | |
+ if (!m_valueList->current() || inShorthand()) { | |
+ addProperty(propId, parsedValue.release(), important); | |
+ return true; | |
+ } | |
+ return false; | |
+ } | |
+ | |
switch (static_cast<CSSPropertyID>(propId)) { | |
/* The comment to the left defines all valid value of this properties as defined | |
* in CSS 2, Appendix F. Property index | |
@@ -1004,25 +1469,10 @@ bool CSSParser::parseValue(int propId, bool important) | |
validPrimitive = (propId == CSSPropertyWebkitRegionBreakInside) ? cssRegionsEnabled() : true; | |
break; | |
- case CSSPropertyEmptyCells: // show | hide | inherit | |
- if (id == CSSValueShow | |
- || id == CSSValueHide) | |
- validPrimitive = true; | |
- break; | |
- | |
case CSSPropertyContent: // [ <string> | <uri> | <counter> | attr(X) | open-quote | | |
// close-quote | no-open-quote | no-close-quote ]+ | inherit | |
return parseContent(propId, important); | |
- case CSSPropertyWhiteSpace: // normal | pre | nowrap | inherit | |
- if (id == CSSValueNormal | |
- || id == CSSValuePre | |
- || id == CSSValuePreWrap | |
- || id == CSSValuePreLine | |
- || id == CSSValueNowrap) | |
- validPrimitive = true; | |
- break; | |
- | |
case CSSPropertyClip: // <shape> | auto | inherit | |
if (id == CSSValueAuto) | |
validPrimitive = true; | |
@@ -1033,22 +1483,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
/* Start of supported CSS properties with validation. This is needed for parseShorthand to work | |
* correctly and allows optimization in WebCore::applyRule(..) | |
*/ | |
- case CSSPropertyCaptionSide: // top | bottom | left | right | inherit | |
- if (id == CSSValueLeft || id == CSSValueRight || | |
- id == CSSValueTop || id == CSSValueBottom) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyBorderCollapse: // collapse | separate | inherit | |
- if (id == CSSValueCollapse || id == CSSValueSeparate) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyVisibility: // visible | hidden | collapse | inherit | |
- if (id == CSSValueVisible || id == CSSValueHidden || id == CSSValueCollapse) | |
- validPrimitive = true; | |
- break; | |
- | |
case CSSPropertyOverflow: { | |
ShorthandScope scope(this, propId); | |
if (num != 1 || !parseValue(CSSPropertyOverflowX, important)) | |
@@ -1057,59 +1491,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
addProperty(CSSPropertyOverflowY, value, important); | |
return true; | |
} | |
- case CSSPropertyOverflowX: | |
- case CSSPropertyOverflowY: // visible | hidden | scroll | auto | marquee | overlay | inherit | |
- if (id == CSSValueVisible || id == CSSValueHidden || id == CSSValueScroll || id == CSSValueAuto || | |
- id == CSSValueOverlay || id == CSSValueWebkitMarquee) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyListStylePosition: // inside | outside | inherit | |
- if (id == CSSValueInside || id == CSSValueOutside) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyListStyleType: | |
- // See section CSS_PROP_LIST_STYLE_TYPE of file CSSValueKeywords.in | |
- // for the list of supported list-style-types. | |
- if ((id >= CSSValueDisc && id <= CSSValueKatakanaIroha) || id == CSSValueNone) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyDisplay: | |
- // inline | block | list-item | run-in | inline-block | table | | |
- // inline-table | table-row-group | table-header-group | table-footer-group | table-row | | |
- // table-column-group | table-column | table-cell | table-caption | -webkit-box | -webkit-inline-box | none | inherit | |
- // -webkit-flexbox | -webkit-inline-flexbox | -webkit-grid | -webkit-inline-grid | |
- if ((id >= CSSValueInline && id <= CSSValueWebkitInlineFlexbox) || id == CSSValueNone) | |
- validPrimitive = true; | |
-#if ENABLE(CSS_GRID_LAYOUT) | |
- if (id == CSSValueWebkitGrid || id == CSSValueWebkitInlineGrid) | |
- validPrimitive = true; | |
-#endif | |
- break; | |
- | |
- case CSSPropertyDirection: // ltr | rtl | inherit | |
- if (id == CSSValueLtr || id == CSSValueRtl) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyTextTransform: // capitalize | uppercase | lowercase | none | inherit | |
- if ((id >= CSSValueCapitalize && id <= CSSValueLowercase) || id == CSSValueNone) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyFloat: // left | right | none | positioned | center (for buggy CSS, maps to none) | |
- if (id == CSSValueLeft || id == CSSValueRight | |
- || id == CSSValueNone || id == CSSValueCenter || id == CSSValueWebkitPositioned) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyClear: // none | left | right | both | inherit | |
- if (id == CSSValueNone || id == CSSValueLeft | |
- || id == CSSValueRight || id == CSSValueBoth) | |
- validPrimitive = true; | |
- break; | |
case CSSPropertyTextAlign: | |
// left | right | center | justify | webkit_left | webkit_right | webkit_center | webkit_match_parent | | |
@@ -1119,24 +1500,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
validPrimitive = true; | |
break; | |
- case CSSPropertyOutlineStyle: // (<border-style> except hidden) | auto | inherit | |
- if (id == CSSValueAuto || id == CSSValueNone || (id >= CSSValueInset && id <= CSSValueDouble)) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyBorderTopStyle: //// <border-style> | inherit | |
- case CSSPropertyBorderRightStyle: // Defined as: none | hidden | dotted | dashed | | |
- case CSSPropertyBorderBottomStyle: // solid | double | groove | ridge | inset | outset | |
- case CSSPropertyBorderLeftStyle: | |
- case CSSPropertyWebkitBorderStartStyle: | |
- case CSSPropertyWebkitBorderEndStyle: | |
- case CSSPropertyWebkitBorderBeforeStyle: | |
- case CSSPropertyWebkitBorderAfterStyle: | |
- case CSSPropertyWebkitColumnRuleStyle: | |
- if (id >= CSSValueNone && id <= CSSValueDouble) | |
- validPrimitive = true; | |
- break; | |
- | |
case CSSPropertyFontWeight: // normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit | |
return parseFontWeight(important); | |
@@ -1351,21 +1714,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
validPrimitive = validUnit(value, FLength, m_strict); | |
break; | |
- case CSSPropertyWordBreak: // normal | break-all | break-word (this is a custom extension) | |
- if (id == CSSValueNormal || id == CSSValueBreakAll || id == CSSValueBreakWord) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyWordWrap: // normal | break-word | |
- if (id == CSSValueNormal || id == CSSValueBreakWord) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertySpeak: // none | normal | spell-out | digits | literal-punctuation | no-punctuation | inherit | |
- if (id == CSSValueNone || id == CSSValueNormal || id == CSSValueSpellOut || id == CSSValueDigits | |
- || id == CSSValueLiteralPunctuation || id == CSSValueNoPunctuation) | |
- validPrimitive = true; | |
- break; | |
- | |
case CSSPropertyTextIndent: // <length> | <percentage> | inherit | |
validPrimitive = (!id && validUnit(value, FLength | FPercent, m_strict)); | |
break; | |
@@ -1408,11 +1756,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
validPrimitive = (validUnit(value, FLength | FPercent | FNonNeg, m_strict)); | |
break; | |
- case CSSPropertyFontStyle: // normal | italic | oblique | inherit | |
- if (id == CSSValueNormal || id == CSSValueItalic || id == CSSValueOblique) | |
- validPrimitive = true; | |
- break; | |
- | |
case CSSPropertyFontVariant: // normal | small-caps | inherit | |
return parseFontVariant(important); | |
@@ -1528,11 +1871,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
validPrimitive = (!id && validUnit(value, FNumber | FPercent | FNonNeg, true)); | |
break; | |
- case CSSPropertyTableLayout: // auto | fixed | inherit | |
- if (id == CSSValueAuto || id == CSSValueFixed) | |
- validPrimitive = true; | |
- break; | |
- | |
case CSSPropertySrc: // Only used within @font-face, so cannot use inherit | initial or be !important. This is a list of urls or local references. | |
return parseFontFaceSrc(); | |
@@ -1540,10 +1878,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
return parseFontFaceUnicodeRange(); | |
/* CSS3 properties */ | |
- case CSSPropertyWebkitAppearance: | |
- if ((id >= CSSValueCheckbox && id <= CSSValueTextarea) || id == CSSValueNone) | |
- validPrimitive = true; | |
- break; | |
case CSSPropertyBorderImage: { | |
RefPtr<CSSValue> result; | |
@@ -1651,29 +1985,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
case CSSPropertyOpacity: | |
validPrimitive = validUnit(value, FNumber, m_strict); | |
break; | |
- case CSSPropertyWebkitBoxAlign: | |
- if (id == CSSValueStretch || id == CSSValueStart || id == CSSValueEnd || | |
- id == CSSValueCenter || id == CSSValueBaseline) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertyWebkitBoxDirection: | |
- if (id == CSSValueNormal || id == CSSValueReverse) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertyWebkitBoxLines: | |
- if (id == CSSValueSingle || id == CSSValueMultiple) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertyWebkitBoxOrient: | |
- if (id == CSSValueHorizontal || id == CSSValueVertical || | |
- id == CSSValueInlineAxis || id == CSSValueBlockAxis) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertyWebkitBoxPack: | |
- if (id == CSSValueStart || id == CSSValueEnd || | |
- id == CSSValueCenter || id == CSSValueJustify) | |
- validPrimitive = true; | |
- break; | |
case CSSPropertyWebkitBoxFlex: | |
validPrimitive = validUnit(value, FNumber, m_strict); | |
break; | |
@@ -1681,12 +1992,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
case CSSPropertyWebkitBoxOrdinalGroup: | |
validPrimitive = validUnit(value, FInteger | FNonNeg, true); | |
break; | |
- case CSSPropertyBoxSizing: | |
- validPrimitive = id == CSSValueBorderBox || id == CSSValueContentBox; | |
- break; | |
- case CSSPropertyWebkitColorCorrection: | |
- validPrimitive = id == CSSValueSrgb || id == CSSValueDefault; | |
- break; | |
#if ENABLE(CSS_FILTERS) | |
case CSSPropertyWebkitFilter: | |
if (id == CSSValueNone) | |
@@ -1709,18 +2014,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
m_valueList->next(); | |
} | |
break; | |
- case CSSPropertyWebkitFlexPack: | |
- validPrimitive = id == CSSValueStart || id == CSSValueEnd || id == CSSValueCenter || id == CSSValueJustify || id == CSSValueDistribute; | |
- break; | |
- case CSSPropertyWebkitFlexAlign: | |
- validPrimitive = id == CSSValueStart || id == CSSValueEnd || id == CSSValueCenter || id == CSSValueBaseline || id == CSSValueStretch; | |
- break; | |
- case CSSPropertyWebkitFlexItemAlign: | |
- validPrimitive = id == CSSValueAuto || id == CSSValueStart || id == CSSValueEnd || id == CSSValueCenter || id == CSSValueBaseline || id == CSSValueStretch; | |
- break; | |
- case CSSPropertyWebkitFlexDirection: | |
- validPrimitive = id == CSSValueRow || id == CSSValueRowReverse || id == CSSValueColumn || id == CSSValueColumnReverse; | |
- break; | |
case CSSPropertyWebkitFlexWrap: | |
validPrimitive = id == CSSValueNone || id == CSSValueWrap || id == CSSValueWrapReverse; | |
break; | |
@@ -1730,22 +2023,12 @@ bool CSSParser::parseValue(int propId, bool important) | |
CSSPropertyWebkitMarqueeStyle, CSSPropertyWebkitMarqueeSpeed }; | |
return parseShorthand(propId, properties, 5, important); | |
} | |
- case CSSPropertyWebkitMarqueeDirection: | |
- if (id == CSSValueForwards || id == CSSValueBackwards || id == CSSValueAhead || | |
- id == CSSValueReverse || id == CSSValueLeft || id == CSSValueRight || id == CSSValueDown || | |
- id == CSSValueUp || id == CSSValueAuto) | |
- validPrimitive = true; | |
- break; | |
case CSSPropertyWebkitMarqueeIncrement: | |
if (id == CSSValueSmall || id == CSSValueLarge || id == CSSValueMedium) | |
validPrimitive = true; | |
else | |
validPrimitive = validUnit(value, FLength | FPercent, m_strict); | |
break; | |
- case CSSPropertyWebkitMarqueeStyle: | |
- if (id == CSSValueNone || id == CSSValueSlide || id == CSSValueScroll || id == CSSValueAlternate) | |
- validPrimitive = true; | |
- break; | |
case CSSPropertyWebkitMarqueeRepetition: | |
if (id == CSSValueInfinite) | |
validPrimitive = true; | |
@@ -1770,23 +2053,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
if (cssRegionsEnabled() && (id == CSSValueAuto || id == CSSValueBreak)) | |
validPrimitive = true; | |
break; | |
- | |
- case CSSPropertyWebkitUserDrag: // auto | none | element | |
- if (id == CSSValueAuto || id == CSSValueNone || id == CSSValueElement) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertyWebkitUserModify: // read-only | read-write | |
- if (id == CSSValueReadOnly || id == CSSValueReadWrite || id == CSSValueReadWritePlaintextOnly) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertyWebkitUserSelect: // auto | none | text | |
- if (id == CSSValueAuto || id == CSSValueNone || id == CSSValueText) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertyTextOverflow: // clip | ellipsis | |
- if (id == CSSValueClip || id == CSSValueEllipsis) | |
- validPrimitive = true; | |
- break; | |
case CSSPropertyWebkitTransform: | |
if (id == CSSValueNone) | |
validPrimitive = true; | |
@@ -1817,18 +2083,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
} | |
return false; | |
} | |
- case CSSPropertyWebkitTransformStyle: | |
- if (value->id == CSSValueFlat || value->id == CSSValuePreserve3d) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertyWebkitBackfaceVisibility: | |
- if (value->id == CSSValueVisible || value->id == CSSValueHidden) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertyWebkitPrintColorAdjust: | |
- if (value->id == CSSValueExact || value->id == CSSValueEconomy) | |
- validPrimitive = true; | |
- break; | |
case CSSPropertyWebkitPerspective: | |
if (id == CSSValueNone) | |
validPrimitive = true; | |
@@ -1906,32 +2160,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
} | |
return false; | |
} | |
- case CSSPropertyWebkitMarginBeforeCollapse: | |
- case CSSPropertyWebkitMarginAfterCollapse: | |
- case CSSPropertyWebkitMarginTopCollapse: | |
- case CSSPropertyWebkitMarginBottomCollapse: | |
- if (id == CSSValueCollapse || id == CSSValueSeparate || id == CSSValueDiscard) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertyTextLineThroughMode: | |
- case CSSPropertyTextOverlineMode: | |
- case CSSPropertyTextUnderlineMode: | |
- if (id == CSSValueContinuous || id == CSSValueSkipWhiteSpace) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertyTextLineThroughStyle: | |
- case CSSPropertyTextOverlineStyle: | |
- case CSSPropertyTextUnderlineStyle: | |
- if (id == CSSValueNone || id == CSSValueSolid || id == CSSValueDouble || | |
- id == CSSValueDashed || id == CSSValueDotDash || id == CSSValueDotDotDash || | |
- id == CSSValueWave) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertyTextRendering: // auto | optimizeSpeed | optimizeLegibility | geometricPrecision | |
- if (id == CSSValueAuto || id == CSSValueOptimizespeed || id == CSSValueOptimizelegibility | |
- || id == CSSValueGeometricprecision) | |
- validPrimitive = true; | |
- break; | |
case CSSPropertyTextLineThroughWidth: | |
case CSSPropertyTextOverlineWidth: | |
case CSSPropertyTextUnderlineWidth: | |
@@ -1941,10 +2169,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
else | |
validPrimitive = !id && validUnit(value, FNumber | FLength | FPercent, m_strict); | |
break; | |
- case CSSPropertyResize: // none | both | horizontal | vertical | auto | |
- if (id == CSSValueNone || id == CSSValueBoth || id == CSSValueHorizontal || id == CSSValueVertical || id == CSSValueAuto) | |
- validPrimitive = true; | |
- break; | |
case CSSPropertyWebkitColumnCount: | |
if (id == CSSValueAuto) | |
validPrimitive = true; | |
@@ -1973,17 +2197,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
else // Always parse this property in strict mode, since it would be ambiguous otherwise when used in the 'columns' shorthand property. | |
validPrimitive = validUnit(value, FLength, true); | |
break; | |
- case CSSPropertyPointerEvents: | |
- // none | visiblePainted | visibleFill | visibleStroke | visible | | |
- // painted | fill | stroke | auto | all | inherit | |
- if (id == CSSValueVisible || id == CSSValueNone || id == CSSValueAll || id == CSSValueAuto || | |
- (id >= CSSValueVisiblepainted && id <= CSSValueStroke)) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertyImageRendering: // auto | optimizeContrast | |
- if (id == CSSValueAuto || id == CSSValueWebkitOptimizeContrast) | |
- validPrimitive = true; | |
- break; | |
// End of CSS3 properties | |
// Apple specific properties. These will never be standardized and are purely to | |
@@ -1993,44 +2206,16 @@ bool CSSParser::parseValue(int propId, bool important) | |
// When specifying either type of unit, require non-negative integers | |
validPrimitive = (!id && (value->unit == CSSPrimitiveValue::CSS_PERCENTAGE || value->fValue) && validUnit(value, FInteger | FPercent | FNonNeg, false)); | |
break; | |
- case CSSPropertyWebkitTextSizeAdjust: | |
- if (id == CSSValueAuto || id == CSSValueNone) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertyWebkitRtlOrdering: | |
- if (id == CSSValueLogical || id == CSSValueVisual) | |
- validPrimitive = true; | |
- break; | |
case CSSPropertyWebkitFontSizeDelta: // <length> | |
validPrimitive = validUnit(value, FLength, m_strict); | |
break; | |
- case CSSPropertyWebkitNbspMode: // normal | space | |
- if (id == CSSValueNormal || id == CSSValueSpace) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyWebkitLineBreak: // normal | after-white-space | |
- if (id == CSSValueNormal || id == CSSValueAfterWhiteSpace) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyWebkitMatchNearestMailBlockquoteColor: // normal | match | |
- if (id == CSSValueNormal || id == CSSValueMatch) | |
- validPrimitive = true; | |
- break; | |
- | |
case CSSPropertyWebkitHighlight: | |
if (id == CSSValueNone || value->unit == CSSPrimitiveValue::CSS_STRING) | |
validPrimitive = true; | |
break; | |
- case CSSPropertyWebkitHyphens: | |
- if (id == CSSValueNone || id == CSSValueManual || id == CSSValueAuto) | |
- validPrimitive = true; | |
- break; | |
- | |
case CSSPropertyWebkitHyphenateCharacter: | |
if (id == CSSValueAuto || value->unit == CSSPrimitiveValue::CSS_STRING) | |
validPrimitive = true; | |
@@ -2058,36 +2243,11 @@ bool CSSParser::parseValue(int propId, bool important) | |
} | |
} | |
break; | |
- case CSSPropertyWebkitLineSnap: | |
- if (id == CSSValueNone || id == CSSValueBaseline || id == CSSValueContain) | |
- validPrimitive = true; | |
- break; | |
- case CSSPropertyWebkitLineAlign: | |
- if (id == CSSValueNone || id == CSSValueEdges) | |
- validPrimitive = true; | |
- break; | |
case CSSPropertyWebkitLocale: | |
if (id == CSSValueAuto || value->unit == CSSPrimitiveValue::CSS_STRING) | |
validPrimitive = true; | |
break; | |
- case CSSPropertyWebkitBorderFit: | |
- if (id == CSSValueBorder || id == CSSValueLines) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyWebkitTextSecurity: | |
- // disc | circle | square | none | inherit | |
- if (id == CSSValueDisc || id == CSSValueCircle || id == CSSValueSquare|| id == CSSValueNone) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyWebkitFontSmoothing: | |
- if (id == CSSValueAuto || id == CSSValueNone | |
- || id == CSSValueAntialiased || id == CSSValueSubpixelAntialiased) | |
- validPrimitive = true; | |
- break; | |
- | |
#if ENABLE(DASHBOARD_SUPPORT) | |
case CSSPropertyWebkitDashboardRegion: // <dashboard-region> | <dashboard-region> | |
if (value->unit == CSSParserValue::Function || id == CSSValueNone) | |
@@ -2109,13 +2269,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
break; | |
#endif | |
-#if ENABLE(OVERFLOW_SCROLLING) | |
- case CSSPropertyWebkitOverflowScrolling: | |
- if (id == CSSValueAuto || id == CSSValueTouch) | |
- validPrimitive = true; | |
- break; | |
-#endif | |
- | |
/* shorthand properties */ | |
case CSSPropertyBackground: { | |
// Position must come before color in this array because a plain old "0" is a legal color | |
@@ -2285,26 +2438,11 @@ bool CSSParser::parseValue(int propId, bool important) | |
case CSSPropertyTextUnderline: | |
return false; | |
// CSS Text Layout Module Level 3: Vertical writing support | |
- case CSSPropertyWebkitWritingMode: | |
- if (id >= CSSValueHorizontalTb && id <= CSSValueHorizontalBt) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyWebkitTextCombine: | |
- if (id == CSSValueNone || id == CSSValueHorizontal) | |
- validPrimitive = true; | |
- break; | |
- | |
case CSSPropertyWebkitTextEmphasis: { | |
const int properties[] = { CSSPropertyWebkitTextEmphasisStyle, CSSPropertyWebkitTextEmphasisColor }; | |
return parseShorthand(propId, properties, WTF_ARRAY_LENGTH(properties), important); | |
} | |
- case CSSPropertyWebkitTextEmphasisPosition: | |
- if (id == CSSValueOver || id == CSSValueUnder) | |
- validPrimitive = true; | |
- break; | |
- | |
case CSSPropertyWebkitTextEmphasisStyle: | |
return parseTextEmphasisStyle(important); | |
@@ -2327,11 +2465,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
return parseFontFeatureSettings(important); | |
break; | |
- case CSSPropertyWebkitFontKerning: | |
- if (id == CSSValueAuto || id == CSSValueNormal || id == CSSValueNone) | |
- validPrimitive = true; | |
- break; | |
- | |
case CSSPropertyWebkitFontVariantLigatures: | |
if (id == CSSValueNormal) | |
validPrimitive = true; | |
@@ -2346,15 +2479,6 @@ bool CSSParser::parseValue(int propId, bool important) | |
else if (value->unit == CSSParserValue::Function) | |
return parseWrapShape((propId == CSSPropertyWebkitWrapShapeInside), important); | |
break; | |
- case CSSPropertyWebkitWrapFlow: | |
- if (id == CSSValueAuto || id == CSSValueBoth || id == CSSValueLeft || id == CSSValueRight || id == CSSValueMaximum || id == CSSValueClear) | |
- validPrimitive = true; | |
- break; | |
- | |
- case CSSPropertyWebkitWrapThrough: | |
- if (id == CSSValueWrap || id == CSSValueNone) | |
- validPrimitive = true; | |
- break; | |
case CSSPropertyWebkitWrapMargin: | |
case CSSPropertyWebkitWrapPadding: | |
validPrimitive = (!id && validUnit(value, FLength | FNonNeg, m_strict)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment