| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 - 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserve
d. | 5 * Copyright (C) 2009 - 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserve
d. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 class CSSBorderImageSliceValue; | 43 class CSSBorderImageSliceValue; |
| 44 class CSSPrimitiveValue; | 44 class CSSPrimitiveValue; |
| 45 class CSSValue; | 45 class CSSValue; |
| 46 class CSSValueList; | 46 class CSSValueList; |
| 47 class CSSBasicShape; | 47 class CSSBasicShape; |
| 48 class CSSBasicShapeInset; | 48 class CSSBasicShapeInset; |
| 49 class ImmutableStylePropertySet; | 49 class ImmutableStylePropertySet; |
| 50 class StylePropertyShorthand; | 50 class StylePropertyShorthand; |
| 51 class UseCounter; | 51 class UseCounter; |
| 52 | 52 |
| 53 // Inputs: PropertyID, isImportant bool, CSSParserValueList. | 53 // Inputs: PropertyID, CSSParserValueList. |
| 54 // Outputs: Vector of CSSProperties | 54 // Outputs: Vector of CSSProperties |
| 55 | 55 |
| 56 class CSSPropertyParser { | 56 class CSSPropertyParser { |
| 57 STACK_ALLOCATED(); | 57 STACK_ALLOCATED(); |
| 58 public: | 58 public: |
| 59 static bool parseValue(CSSPropertyID, bool important, | 59 static bool parseValue(CSSPropertyID, |
| 60 CSSParserValueList*, const CSSParserContext&, bool inViewport, | 60 CSSParserValueList*, const CSSParserContext&, bool inViewport, |
| 61 Vector<CSSProperty, 256>&, CSSRuleSourceData::Type); | 61 Vector<CSSProperty, 256>&, CSSRuleSourceData::Type); |
| 62 | 62 |
| 63 // FIXME: Should this be on a separate ColorParser object? | 63 // FIXME: Should this be on a separate ColorParser object? |
| 64 template<typename StringType> | 64 template<typename StringType> |
| 65 static bool fastParseColor(RGBA32&, const StringType&, bool strict); | 65 static bool fastParseColor(RGBA32&, const StringType&, bool strict); |
| 66 | 66 |
| 67 static bool isSystemColor(int id); | 67 static bool isSystemColor(int id); |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 CSSPropertyParser(CSSParserValueList*, const CSSParserContext&, bool inViewp
ort, | 70 CSSPropertyParser(CSSParserValueList*, const CSSParserContext&, bool inViewp
ort, |
| 71 Vector<CSSProperty, 256>&, CSSRuleSourceData::Type); | 71 Vector<CSSProperty, 256>&, CSSRuleSourceData::Type); |
| 72 | 72 |
| 73 bool parseValue(CSSPropertyID, bool important); | 73 bool parseValue(CSSPropertyID); |
| 74 | 74 |
| 75 bool inShorthand() const { return m_inParseShorthand; } | 75 bool inShorthand() const { return m_inParseShorthand; } |
| 76 bool inQuirksMode() const { return isQuirksModeBehavior(m_context.mode()); } | 76 bool inQuirksMode() const { return isQuirksModeBehavior(m_context.mode()); } |
| 77 | 77 |
| 78 bool inViewport() const { return m_inViewport; } | 78 bool inViewport() const { return m_inViewport; } |
| 79 bool parseViewportProperty(CSSPropertyID propId, bool important); | 79 bool parseViewportProperty(CSSPropertyID propId); |
| 80 bool parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPr
opertyID second, bool important); | 80 bool parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPr
opertyID second); |
| 81 | 81 |
| 82 KURL completeURL(const String& url) const; | 82 KURL completeURL(const String& url) const; |
| 83 | 83 |
| 84 void addProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important, bool i
mplicit = false); | 84 void addProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool implicit = false)
; |
| 85 void rollbackLastProperties(int num); | 85 void rollbackLastProperties(int num); |
| 86 void addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtr<CSSValue>,
bool); | 86 void addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtr<CSSValue>)
; |
| 87 | 87 |
| 88 PassRefPtr<CSSPrimitiveValue> parseValidPrimitive(CSSValueID ident, CSSParse
rValue*); | 88 PassRefPtr<CSSPrimitiveValue> parseValidPrimitive(CSSValueID ident, CSSParse
rValue*); |
| 89 | 89 |
| 90 bool parseShorthand(CSSPropertyID, const StylePropertyShorthand&, bool impor
tant); | 90 bool parseShorthand(CSSPropertyID, const StylePropertyShorthand&); |
| 91 bool parse4Values(CSSPropertyID, const CSSPropertyID* properties, bool impor
tant); | 91 bool parse4Values(CSSPropertyID, const CSSPropertyID* properties); |
| 92 PassRefPtr<CSSValue> parseQuotes(); | 92 PassRefPtr<CSSValue> parseQuotes(); |
| 93 | 93 |
| 94 PassRefPtr<CSSValue> parseAttr(CSSParserValueList* args); | 94 PassRefPtr<CSSValue> parseAttr(CSSParserValueList* args); |
| 95 | 95 |
| 96 PassRefPtr<CSSValue> parseBackgroundColor(); | 96 PassRefPtr<CSSValue> parseBackgroundColor(); |
| 97 | 97 |
| 98 bool parseFillImage(CSSParserValueList*, RefPtr<CSSValue>&); | 98 bool parseFillImage(CSSParserValueList*, RefPtr<CSSValue>&); |
| 99 | 99 |
| 100 enum FillPositionFlag { InvalidFillPosition = 0, AmbiguousFillPosition = 1,
XFillPosition = 2, YFillPosition = 4 }; | 100 enum FillPositionFlag { InvalidFillPosition = 0, AmbiguousFillPosition = 1,
XFillPosition = 2, YFillPosition = 4 }; |
| 101 enum FillPositionParsingMode { ResolveValuesAsPercent = 0, ResolveValuesAsKe
yword = 1 }; | 101 enum FillPositionParsingMode { ResolveValuesAsPercent = 0, ResolveValuesAsKe
yword = 1 }; |
| 102 PassRefPtr<CSSPrimitiveValue> parseFillPositionComponent(CSSParserValueList*
, unsigned& cumulativeFlags, FillPositionFlag& individualFlag, FillPositionParsi
ngMode = ResolveValuesAsPercent); | 102 PassRefPtr<CSSPrimitiveValue> parseFillPositionComponent(CSSParserValueList*
, unsigned& cumulativeFlags, FillPositionFlag& individualFlag, FillPositionParsi
ngMode = ResolveValuesAsPercent); |
| 103 PassRefPtr<CSSValue> parseFillPositionX(CSSParserValueList*); | 103 PassRefPtr<CSSValue> parseFillPositionX(CSSParserValueList*); |
| 104 PassRefPtr<CSSValue> parseFillPositionY(CSSParserValueList*); | 104 PassRefPtr<CSSValue> parseFillPositionY(CSSParserValueList*); |
| 105 void parse2ValuesFillPosition(CSSParserValueList*, RefPtr<CSSValue>&, RefPtr
<CSSValue>&); | 105 void parse2ValuesFillPosition(CSSParserValueList*, RefPtr<CSSValue>&, RefPtr
<CSSValue>&); |
| 106 bool isPotentialPositionValue(CSSParserValue*); | 106 bool isPotentialPositionValue(CSSParserValue*); |
| 107 void parseFillPosition(CSSParserValueList*, RefPtr<CSSValue>&, RefPtr<CSSVal
ue>&); | 107 void parseFillPosition(CSSParserValueList*, RefPtr<CSSValue>&, RefPtr<CSSVal
ue>&); |
| 108 void parse3ValuesFillPosition(CSSParserValueList*, RefPtr<CSSValue>&, RefPtr
<CSSValue>&, PassRefPtr<CSSPrimitiveValue>, PassRefPtr<CSSPrimitiveValue>); | 108 void parse3ValuesFillPosition(CSSParserValueList*, RefPtr<CSSValue>&, RefPtr
<CSSValue>&, PassRefPtr<CSSPrimitiveValue>, PassRefPtr<CSSPrimitiveValue>); |
| 109 void parse4ValuesFillPosition(CSSParserValueList*, RefPtr<CSSValue>&, RefPtr
<CSSValue>&, PassRefPtr<CSSPrimitiveValue>, PassRefPtr<CSSPrimitiveValue>); | 109 void parse4ValuesFillPosition(CSSParserValueList*, RefPtr<CSSValue>&, RefPtr
<CSSValue>&, PassRefPtr<CSSPrimitiveValue>, PassRefPtr<CSSPrimitiveValue>); |
| 110 | 110 |
| 111 void parseFillRepeat(RefPtr<CSSValue>&, RefPtr<CSSValue>&); | 111 void parseFillRepeat(RefPtr<CSSValue>&, RefPtr<CSSValue>&); |
| 112 PassRefPtr<CSSValue> parseFillSize(CSSPropertyID, bool &allowComma); | 112 PassRefPtr<CSSValue> parseFillSize(CSSPropertyID, bool &allowComma); |
| 113 | 113 |
| 114 bool parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1, CSSProp
ertyID& propId2, RefPtr<CSSValue>&, RefPtr<CSSValue>&); | 114 bool parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1, CSSProp
ertyID& propId2, RefPtr<CSSValue>&, RefPtr<CSSValue>&); |
| 115 bool parseFillShorthand(CSSPropertyID, const CSSPropertyID* properties, int
numProperties, bool important); | 115 bool parseFillShorthand(CSSPropertyID, const CSSPropertyID* properties, int
numProperties); |
| 116 | 116 |
| 117 void addFillValue(RefPtr<CSSValue>& lval, PassRefPtr<CSSValue> rval); | 117 void addFillValue(RefPtr<CSSValue>& lval, PassRefPtr<CSSValue> rval); |
| 118 | 118 |
| 119 PassRefPtr<CSSValue> parseAnimationDelay(); | 119 PassRefPtr<CSSValue> parseAnimationDelay(); |
| 120 PassRefPtr<CSSValue> parseAnimationDirection(); | 120 PassRefPtr<CSSValue> parseAnimationDirection(); |
| 121 PassRefPtr<CSSValue> parseAnimationDuration(); | 121 PassRefPtr<CSSValue> parseAnimationDuration(); |
| 122 PassRefPtr<CSSValue> parseAnimationFillMode(); | 122 PassRefPtr<CSSValue> parseAnimationFillMode(); |
| 123 PassRefPtr<CSSValue> parseAnimationIterationCount(); | 123 PassRefPtr<CSSValue> parseAnimationIterationCount(); |
| 124 PassRefPtr<CSSValue> parseAnimationName(); | 124 PassRefPtr<CSSValue> parseAnimationName(); |
| 125 PassRefPtr<CSSValue> parseAnimationPlayState(); | 125 PassRefPtr<CSSValue> parseAnimationPlayState(); |
| 126 PassRefPtr<CSSValue> parseAnimationProperty(); | 126 PassRefPtr<CSSValue> parseAnimationProperty(); |
| 127 PassRefPtr<CSSValue> parseAnimationTimingFunction(); | 127 PassRefPtr<CSSValue> parseAnimationTimingFunction(); |
| 128 | 128 |
| 129 bool parseWebkitTransformOriginShorthand(bool important); | 129 bool parseWebkitTransformOriginShorthand(); |
| 130 bool parseCubicBezierTimingFunctionValue(CSSParserValueList*& args, double&
result); | 130 bool parseCubicBezierTimingFunctionValue(CSSParserValueList*& args, double&
result); |
| 131 PassRefPtr<CSSValue> parseAnimationProperty(CSSPropertyID); | 131 PassRefPtr<CSSValue> parseAnimationProperty(CSSPropertyID); |
| 132 PassRefPtr<CSSValueList> parseAnimationPropertyList(CSSPropertyID); | 132 PassRefPtr<CSSValueList> parseAnimationPropertyList(CSSPropertyID); |
| 133 bool parseTransitionShorthand(CSSPropertyID, bool important); | 133 bool parseTransitionShorthand(CSSPropertyID); |
| 134 bool parseAnimationShorthand(CSSPropertyID, bool important); | 134 bool parseAnimationShorthand(CSSPropertyID); |
| 135 | 135 |
| 136 bool parseClipShape(CSSPropertyID, bool important); | 136 bool parseClipShape(CSSPropertyID); |
| 137 | 137 |
| 138 bool parseItemPositionOverflowPosition(CSSPropertyID, bool important); | 138 bool parseItemPositionOverflowPosition(CSSPropertyID); |
| 139 | 139 |
| 140 PassRefPtr<CSSValue> parseShapeProperty(CSSPropertyID propId); | 140 PassRefPtr<CSSValue> parseShapeProperty(CSSPropertyID propId); |
| 141 PassRefPtr<CSSValue> parseBasicShapeAndOrBox(); | 141 PassRefPtr<CSSValue> parseBasicShapeAndOrBox(); |
| 142 PassRefPtr<CSSPrimitiveValue> parseBasicShape(); | 142 PassRefPtr<CSSPrimitiveValue> parseBasicShape(); |
| 143 PassRefPtr<CSSPrimitiveValue> parseShapeRadius(CSSParserValue*); | 143 PassRefPtr<CSSPrimitiveValue> parseShapeRadius(CSSParserValue*); |
| 144 | 144 |
| 145 PassRefPtr<CSSBasicShape> parseBasicShapeCircle(CSSParserValueList* args); | 145 PassRefPtr<CSSBasicShape> parseBasicShapeCircle(CSSParserValueList* args); |
| 146 PassRefPtr<CSSBasicShape> parseBasicShapeEllipse(CSSParserValueList* args); | 146 PassRefPtr<CSSBasicShape> parseBasicShapeEllipse(CSSParserValueList* args); |
| 147 PassRefPtr<CSSBasicShape> parseBasicShapePolygon(CSSParserValueList* args); | 147 PassRefPtr<CSSBasicShape> parseBasicShapePolygon(CSSParserValueList* args); |
| 148 PassRefPtr<CSSBasicShape> parseBasicShapeInset(CSSParserValueList* args); | 148 PassRefPtr<CSSBasicShape> parseBasicShapeInset(CSSParserValueList* args); |
| 149 | 149 |
| 150 bool parseFont(bool important); | 150 bool parseFont(); |
| 151 PassRefPtr<CSSValueList> parseFontFamily(); | 151 PassRefPtr<CSSValueList> parseFontFamily(); |
| 152 | 152 |
| 153 bool parseColorParameters(CSSParserValue*, int* colorValues, bool parseAlpha
); | 153 bool parseColorParameters(CSSParserValue*, int* colorValues, bool parseAlpha
); |
| 154 bool parseHSLParameters(CSSParserValue*, double* colorValues, bool parseAlph
a); | 154 bool parseHSLParameters(CSSParserValue*, double* colorValues, bool parseAlph
a); |
| 155 PassRefPtr<CSSPrimitiveValue> parseColor(CSSParserValue* = 0, bool acceptQui
rkyColors = false); | 155 PassRefPtr<CSSPrimitiveValue> parseColor(CSSParserValue* = 0, bool acceptQui
rkyColors = false); |
| 156 bool parseColorFromValue(CSSParserValue*, RGBA32&, bool acceptQuirkyColors =
false); | 156 bool parseColorFromValue(CSSParserValue*, RGBA32&, bool acceptQuirkyColors =
false); |
| 157 | 157 |
| 158 bool parseLineHeight(bool important); | 158 bool parseLineHeight(); |
| 159 bool parseFontSize(bool important); | 159 bool parseFontSize(); |
| 160 bool parseFontVariant(bool important); | 160 bool parseFontVariant(); |
| 161 bool parseFontWeight(bool important); | 161 bool parseFontWeight(); |
| 162 PassRefPtr<CSSValueList> parseFontFaceSrc(); | 162 PassRefPtr<CSSValueList> parseFontFaceSrc(); |
| 163 PassRefPtr<CSSValueList> parseFontFaceUnicodeRange(); | 163 PassRefPtr<CSSValueList> parseFontFaceUnicodeRange(); |
| 164 | 164 |
| 165 // CSS3 Parsing Routines (for properties specific to CSS3) | 165 // CSS3 Parsing Routines (for properties specific to CSS3) |
| 166 PassRefPtr<CSSValueList> parseShadow(CSSParserValueList*, CSSPropertyID); | 166 PassRefPtr<CSSValueList> parseShadow(CSSParserValueList*, CSSPropertyID); |
| 167 bool parseBorderImageShorthand(CSSPropertyID, bool important); | 167 bool parseBorderImageShorthand(CSSPropertyID); |
| 168 PassRefPtr<CSSValue> parseBorderImage(CSSPropertyID); | 168 PassRefPtr<CSSValue> parseBorderImage(CSSPropertyID); |
| 169 bool parseBorderImageRepeat(RefPtr<CSSValue>&); | 169 bool parseBorderImageRepeat(RefPtr<CSSValue>&); |
| 170 bool parseBorderImageSlice(CSSPropertyID, RefPtr<CSSBorderImageSliceValue>&)
; | 170 bool parseBorderImageSlice(CSSPropertyID, RefPtr<CSSBorderImageSliceValue>&)
; |
| 171 bool parseBorderImageWidth(RefPtr<CSSPrimitiveValue>&); | 171 bool parseBorderImageWidth(RefPtr<CSSPrimitiveValue>&); |
| 172 bool parseBorderImageOutset(RefPtr<CSSPrimitiveValue>&); | 172 bool parseBorderImageOutset(RefPtr<CSSPrimitiveValue>&); |
| 173 bool parseBorderRadius(CSSPropertyID, bool important); | 173 bool parseBorderRadius(CSSPropertyID); |
| 174 | 174 |
| 175 PassRefPtr<CSSValue> parseAspectRatio(); | 175 PassRefPtr<CSSValue> parseAspectRatio(); |
| 176 | 176 |
| 177 bool parseFlex(CSSParserValueList* args, bool important); | 177 bool parseFlex(CSSParserValueList* args); |
| 178 | 178 |
| 179 PassRefPtr<CSSValue> parseObjectPosition(); | 179 PassRefPtr<CSSValue> parseObjectPosition(); |
| 180 | 180 |
| 181 // Image generators | 181 // Image generators |
| 182 bool parseCanvas(CSSParserValueList*, RefPtr<CSSValue>&); | 182 bool parseCanvas(CSSParserValueList*, RefPtr<CSSValue>&); |
| 183 | 183 |
| 184 bool parseLinearGradient(CSSParserValueList*, RefPtr<CSSValue>&, CSSGradient
Repeat repeating); | 184 bool parseLinearGradient(CSSParserValueList*, RefPtr<CSSValue>&, CSSGradient
Repeat repeating); |
| 185 bool parseRadialGradient(CSSParserValueList*, RefPtr<CSSValue>&, CSSGradient
Repeat repeating); | 185 bool parseRadialGradient(CSSParserValueList*, RefPtr<CSSValue>&, CSSGradient
Repeat repeating); |
| 186 bool parseGradientColorStops(CSSParserValueList*, CSSGradientValue*, bool ex
pectComma); | 186 bool parseGradientColorStops(CSSParserValueList*, CSSGradientValue*, bool ex
pectComma); |
| 187 | 187 |
| 188 bool parseCrossfade(CSSParserValueList*, RefPtr<CSSValue>&); | 188 bool parseCrossfade(CSSParserValueList*, RefPtr<CSSValue>&); |
| 189 | 189 |
| 190 PassRefPtr<CSSValue> parseImageSet(CSSParserValueList*); | 190 PassRefPtr<CSSValue> parseImageSet(CSSParserValueList*); |
| 191 | 191 |
| 192 PassRefPtr<CSSValue> parseWillChange(); | 192 PassRefPtr<CSSValue> parseWillChange(); |
| 193 | 193 |
| 194 PassRefPtr<CSSValueList> parseFilter(); | 194 PassRefPtr<CSSValueList> parseFilter(); |
| 195 PassRefPtr<CSSFilterValue> parseBuiltinFilterArguments(CSSParserValueList*,
CSSFilterValue::FilterOperationType); | 195 PassRefPtr<CSSFilterValue> parseBuiltinFilterArguments(CSSParserValueList*,
CSSFilterValue::FilterOperationType); |
| 196 | 196 |
| 197 PassRefPtr<CSSValueList> parseTransformOrigin(); | 197 PassRefPtr<CSSValueList> parseTransformOrigin(); |
| 198 PassRefPtr<CSSValueList> parseTransform(CSSPropertyID); | 198 PassRefPtr<CSSValueList> parseTransform(CSSPropertyID); |
| 199 PassRefPtr<CSSValue> parseTransformValue(CSSPropertyID, CSSParserValue*); | 199 PassRefPtr<CSSValue> parseTransformValue(CSSPropertyID, CSSParserValue*); |
| 200 | 200 |
| 201 bool parseTextEmphasisStyle(bool important); | 201 bool parseTextEmphasisStyle(); |
| 202 | 202 |
| 203 PassRefPtr<CSSValue> parseTouchAction(); | 203 PassRefPtr<CSSValue> parseTouchAction(); |
| 204 | 204 |
| 205 void addTextDecorationProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool imp
ortant); | 205 void addTextDecorationProperty(CSSPropertyID, PassRefPtr<CSSValue>); |
| 206 bool parseTextDecoration(CSSPropertyID propId, bool important); | 206 bool parseTextDecoration(CSSPropertyID propId); |
| 207 bool parseTextUnderlinePosition(bool important); | 207 bool parseTextUnderlinePosition(); |
| 208 | 208 |
| 209 PassRefPtr<CSSValue> parseTextIndent(); | 209 PassRefPtr<CSSValue> parseTextIndent(); |
| 210 | 210 |
| 211 bool parseLineBoxContain(bool important); | 211 bool parseLineBoxContain(); |
| 212 bool parseCalculation(CSSParserValue*, ValueRange); | 212 bool parseCalculation(CSSParserValue*, ValueRange); |
| 213 | 213 |
| 214 bool parseFontFeatureTag(CSSValueList*); | 214 bool parseFontFeatureTag(CSSValueList*); |
| 215 bool parseFontFeatureSettings(bool important); | 215 bool parseFontFeatureSettings(); |
| 216 | 216 |
| 217 bool parseFontVariantLigatures(bool important); | 217 bool parseFontVariantLigatures(); |
| 218 | 218 |
| 219 bool parseGeneratedImage(CSSParserValueList*, RefPtr<CSSValue>&); | 219 bool parseGeneratedImage(CSSParserValueList*, RefPtr<CSSValue>&); |
| 220 | 220 |
| 221 PassRefPtr<CSSPrimitiveValue> createPrimitiveNumericValue(CSSParserValue*); | 221 PassRefPtr<CSSPrimitiveValue> createPrimitiveNumericValue(CSSParserValue*); |
| 222 PassRefPtr<CSSPrimitiveValue> createPrimitiveStringValue(CSSParserValue*); | 222 PassRefPtr<CSSPrimitiveValue> createPrimitiveStringValue(CSSParserValue*); |
| 223 | 223 |
| 224 PassRefPtr<CSSValue> createCSSImageValueWithReferrer(const String& rawValue,
const KURL&); | 224 PassRefPtr<CSSValue> createCSSImageValueWithReferrer(const String& rawValue,
const KURL&); |
| 225 | 225 |
| 226 bool validWidthOrHeight(CSSParserValue*); | 226 bool validWidthOrHeight(CSSParserValue*); |
| 227 | 227 |
| 228 PassRefPtr<CSSBasicShape> parseInsetRoundedCorners(PassRefPtr<CSSBasicShapeI
nset>, CSSParserValueList*); | 228 PassRefPtr<CSSBasicShape> parseInsetRoundedCorners(PassRefPtr<CSSBasicShapeI
nset>, CSSParserValueList*); |
| 229 | 229 |
| 230 enum SizeParameterType { | 230 enum SizeParameterType { |
| 231 None, | 231 None, |
| 232 Auto, | 232 Auto, |
| 233 Length, | 233 Length, |
| 234 PageSize, | 234 PageSize, |
| 235 Orientation, | 235 Orientation, |
| 236 }; | 236 }; |
| 237 | 237 |
| 238 bool parsePage(CSSPropertyID propId, bool important); | 238 bool parsePage(CSSPropertyID propId); |
| 239 bool parseSize(CSSPropertyID propId, bool important); | 239 bool parseSize(CSSPropertyID propId); |
| 240 SizeParameterType parseSizeParameter(CSSValueList* parsedValues, CSSParserVa
lue*, SizeParameterType prevParamType); | 240 SizeParameterType parseSizeParameter(CSSValueList* parsedValues, CSSParserVa
lue*, SizeParameterType prevParamType); |
| 241 | 241 |
| 242 bool parseFontFaceSrcURI(CSSValueList*); | 242 bool parseFontFaceSrcURI(CSSValueList*); |
| 243 bool parseFontFaceSrcLocal(CSSValueList*); | 243 bool parseFontFaceSrcLocal(CSSValueList*); |
| 244 | 244 |
| 245 class ImplicitScope { | 245 class ImplicitScope { |
| 246 STACK_ALLOCATED(); | 246 STACK_ALLOCATED(); |
| 247 WTF_MAKE_NONCOPYABLE(ImplicitScope); | 247 WTF_MAKE_NONCOPYABLE(ImplicitScope); |
| 248 public: | 248 public: |
| 249 ImplicitScope(CSSPropertyParser* parser) | 249 ImplicitScope(CSSPropertyParser* parser) |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 CSSPropertyID cssPropertyID(const CSSParserString&); | 344 CSSPropertyID cssPropertyID(const CSSParserString&); |
| 345 CSSPropertyID cssPropertyID(const String&); | 345 CSSPropertyID cssPropertyID(const String&); |
| 346 CSSValueID cssValueKeywordID(const CSSParserString&); | 346 CSSValueID cssValueKeywordID(const CSSParserString&); |
| 347 | 347 |
| 348 bool isKeywordPropertyID(CSSPropertyID); | 348 bool isKeywordPropertyID(CSSPropertyID); |
| 349 bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID, const CSSParserCo
ntext&); | 349 bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID, const CSSParserCo
ntext&); |
| 350 | 350 |
| 351 } // namespace blink | 351 } // namespace blink |
| 352 | 352 |
| 353 #endif // SKY_ENGINE_CORE_CSS_PARSER_CSSPROPERTYPARSER_H_ | 353 #endif // SKY_ENGINE_CORE_CSS_PARSER_CSSPROPERTYPARSER_H_ |
| OLD | NEW |