| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 bool inShorthand() const { return m_inParseShorthand; } | 86 bool inShorthand() const { return m_inParseShorthand; } |
| 87 bool inQuirksMode() const { return isQuirksModeBehavior(m_context.mode()); } | 87 bool inQuirksMode() const { return isQuirksModeBehavior(m_context.mode()); } |
| 88 | 88 |
| 89 bool parseViewportProperty(CSSPropertyID propId, bool important); | 89 bool parseViewportProperty(CSSPropertyID propId, bool important); |
| 90 bool parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPr
opertyID second, bool important); | 90 bool parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPr
opertyID second, bool important); |
| 91 bool parseFontFaceDescriptor(CSSPropertyID); | 91 bool parseFontFaceDescriptor(CSSPropertyID); |
| 92 | 92 |
| 93 KURL completeURL(const String& url) const; | 93 KURL completeURL(const String& url) const; |
| 94 | 94 |
| 95 void addProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValue>, bool impor
tant, bool implicit = false); | 95 void addProperty(CSSPropertyID, CSSValue, bool important, bool implicit = fa
lse); |
| 96 void rollbackLastProperties(int num); | 96 void rollbackLastProperties(int num); |
| 97 void addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtrWillBeRawPt
r<CSSValue>, bool); | 97 void addExpandedPropertyForValue(CSSPropertyID propId, CSSValue, bool); |
| 98 | 98 |
| 99 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseValidPrimitive(CSSValueID ide
nt, CSSParserValue*); | 99 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseValidPrimitive(CSSValueID ide
nt, CSSParserValue*); |
| 100 | 100 |
| 101 bool parseShorthand(CSSPropertyID, const StylePropertyShorthand&, bool impor
tant); | 101 bool parseShorthand(CSSPropertyID, const StylePropertyShorthand&, bool impor
tant); |
| 102 bool parse4Values(CSSPropertyID, const CSSPropertyID* properties, bool impor
tant); | 102 bool parse4Values(CSSPropertyID, const CSSPropertyID* properties, bool impor
tant); |
| 103 PassRefPtrWillBeRawPtr<CSSValueList> parseContent(); | 103 PassRefPtrWillBeRawPtr<CSSValueList> parseContent(); |
| 104 PassRefPtrWillBeRawPtr<CSSValue> parseQuotes(); | 104 NullableCSSValue parseQuotes(); |
| 105 | 105 |
| 106 PassRefPtrWillBeRawPtr<CSSValue> parseAttr(CSSParserValueList* args); | 106 NullableCSSValue parseAttr(CSSParserValueList* args); |
| 107 | 107 |
| 108 bool parseFillImage(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&); | 108 bool parseFillImage(CSSParserValueList*, NullableCSSValue&); |
| 109 | 109 |
| 110 enum FillPositionFlag { InvalidFillPosition = 0, AmbiguousFillPosition = 1,
XFillPosition = 2, YFillPosition = 4 }; | 110 enum FillPositionFlag { InvalidFillPosition = 0, AmbiguousFillPosition = 1,
XFillPosition = 2, YFillPosition = 4 }; |
| 111 enum FillPositionParsingMode { ResolveValuesAsPercent = 0, ResolveValuesAsKe
yword = 1 }; | 111 enum FillPositionParsingMode { ResolveValuesAsPercent = 0, ResolveValuesAsKe
yword = 1 }; |
| 112 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseFillPositionComponent(CSSPars
erValueList*, unsigned& cumulativeFlags, FillPositionFlag& individualFlag, FillP
ositionParsingMode = ResolveValuesAsPercent, Units = FUnknown); | 112 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseFillPositionComponent(CSSPars
erValueList*, unsigned& cumulativeFlags, FillPositionFlag& individualFlag, FillP
ositionParsingMode = ResolveValuesAsPercent, Units = FUnknown); |
| 113 PassRefPtrWillBeRawPtr<CSSValue> parseFillPositionX(CSSParserValueList*); | 113 NullableCSSValue parseFillPositionX(CSSParserValueList*); |
| 114 PassRefPtrWillBeRawPtr<CSSValue> parseFillPositionY(CSSParserValueList*); | 114 NullableCSSValue parseFillPositionY(CSSParserValueList*); |
| 115 void parse2ValuesFillPosition(CSSParserValueList*, RefPtrWillBeRawPtr<CSSVal
ue>&, RefPtrWillBeRawPtr<CSSValue>&, Units = FUnknown); | 115 void parse2ValuesFillPosition(CSSParserValueList*, NullableCSSValue&, Nullab
leCSSValue&, Units = FUnknown); |
| 116 bool isPotentialPositionValue(CSSParserValue*); | 116 bool isPotentialPositionValue(CSSParserValue*); |
| 117 void parseFillPosition(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, R
efPtrWillBeRawPtr<CSSValue>&, Units = FUnknown); | 117 void parseFillPosition(CSSParserValueList*, NullableCSSValue&, NullableCSSVa
lue&, Units = FUnknown); |
| 118 void parse3ValuesFillPosition(CSSParserValueList*, RefPtrWillBeRawPtr<CSSVal
ue>&, RefPtrWillBeRawPtr<CSSValue>&, PassRefPtrWillBeRawPtr<CSSPrimitiveValue>,
PassRefPtrWillBeRawPtr<CSSPrimitiveValue>); | 118 void parse3ValuesFillPosition(CSSParserValueList*, NullableCSSValue&, Nullab
leCSSValue&, PassRefPtrWillBeRawPtr<CSSPrimitiveValue>, PassRefPtrWillBeRawPtr<C
SSPrimitiveValue>); |
| 119 void parse4ValuesFillPosition(CSSParserValueList*, RefPtrWillBeRawPtr<CSSVal
ue>&, RefPtrWillBeRawPtr<CSSValue>&, PassRefPtrWillBeRawPtr<CSSPrimitiveValue>,
PassRefPtrWillBeRawPtr<CSSPrimitiveValue>); | 119 void parse4ValuesFillPosition(CSSParserValueList*, NullableCSSValue&, Nullab
leCSSValue&, PassRefPtrWillBeRawPtr<CSSPrimitiveValue>, PassRefPtrWillBeRawPtr<C
SSPrimitiveValue>); |
| 120 | 120 |
| 121 void parseFillRepeat(RefPtrWillBeRawPtr<CSSValue>&, RefPtrWillBeRawPtr<CSSVa
lue>&); | 121 void parseFillRepeat(NullableCSSValue&, NullableCSSValue&); |
| 122 PassRefPtrWillBeRawPtr<CSSValue> parseFillSize(CSSPropertyID); | 122 NullableCSSValue parseFillSize(CSSPropertyID); |
| 123 | 123 |
| 124 bool parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1, CSSProp
ertyID& propId2, RefPtrWillBeRawPtr<CSSValue>&, RefPtrWillBeRawPtr<CSSValue>&); | 124 bool parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1, CSSProp
ertyID& propId2, NullableCSSValue&, NullableCSSValue&); |
| 125 bool parseFillShorthand(CSSPropertyID, const CSSPropertyID* properties, int
numProperties, bool important); | 125 bool parseFillShorthand(CSSPropertyID, const CSSPropertyID* properties, int
numProperties, bool important); |
| 126 | 126 |
| 127 void addFillValue(RefPtrWillBeRawPtr<CSSValue>& lval, PassRefPtrWillBeRawPtr
<CSSValue> rval); | 127 void addFillValue(NullableCSSValue& lval, CSSValue rval); |
| 128 | 128 |
| 129 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationDelay(); | 129 NullableCSSValue parseAnimationDelay(); |
| 130 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationDirection(); | 130 NullableCSSValue parseAnimationDirection(); |
| 131 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationDuration(); | 131 NullableCSSValue parseAnimationDuration(); |
| 132 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationFillMode(); | 132 NullableCSSValue parseAnimationFillMode(); |
| 133 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationIterationCount(); | 133 NullableCSSValue parseAnimationIterationCount(); |
| 134 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationName(bool allowQuotedName); | 134 NullableCSSValue parseAnimationName(bool allowQuotedName); |
| 135 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationPlayState(); | 135 NullableCSSValue parseAnimationPlayState(); |
| 136 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationProperty(); | 136 NullableCSSValue parseAnimationProperty(); |
| 137 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationTimingFunction(); | 137 NullableCSSValue parseAnimationTimingFunction(); |
| 138 | 138 |
| 139 bool parseCubicBezierTimingFunctionValue(CSSParserValueList*& args, double&
result); | 139 bool parseCubicBezierTimingFunctionValue(CSSParserValueList*& args, double&
result); |
| 140 | 140 |
| 141 // Legacy parsing allows <string>s for animation-name | 141 // Legacy parsing allows <string>s for animation-name |
| 142 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationProperty(CSSPropertyID, bool
useLegacyParsing); | 142 NullableCSSValue parseAnimationProperty(CSSPropertyID, bool useLegacyParsing
); |
| 143 PassRefPtrWillBeRawPtr<CSSValueList> parseAnimationPropertyList(CSSPropertyI
D, bool useLegacyParsing); | 143 PassRefPtrWillBeRawPtr<CSSValueList> parseAnimationPropertyList(CSSPropertyI
D, bool useLegacyParsing); |
| 144 bool parseAnimationShorthand(bool useLegacyParsing, bool important); | 144 bool parseAnimationShorthand(bool useLegacyParsing, bool important); |
| 145 bool parseTransitionShorthand(bool important); | 145 bool parseTransitionShorthand(bool important); |
| 146 | 146 |
| 147 PassRefPtrWillBeRawPtr<CSSValue> parseColumnWidth(); | 147 NullableCSSValue parseColumnWidth(); |
| 148 PassRefPtrWillBeRawPtr<CSSValue> parseColumnCount(); | 148 NullableCSSValue parseColumnCount(); |
| 149 bool parseColumnsShorthand(bool important); | 149 bool parseColumnsShorthand(bool important); |
| 150 | 150 |
| 151 PassRefPtrWillBeRawPtr<CSSValue> parseGridPosition(); | 151 NullableCSSValue parseGridPosition(); |
| 152 bool parseIntegerOrCustomIdentFromGridPosition(RefPtrWillBeRawPtr<CSSPrimiti
veValue>& numericValue, RefPtrWillBeRawPtr<CSSPrimitiveValue>& gridLineName); | 152 bool parseIntegerOrCustomIdentFromGridPosition(RefPtrWillBeRawPtr<CSSPrimiti
veValue>& numericValue, RefPtrWillBeRawPtr<CSSPrimitiveValue>& gridLineName); |
| 153 bool parseGridItemPositionShorthand(CSSPropertyID, bool important); | 153 bool parseGridItemPositionShorthand(CSSPropertyID, bool important); |
| 154 bool parseGridTemplateRowsAndAreas(PassRefPtrWillBeRawPtr<CSSValue>, bool im
portant); | 154 bool parseGridTemplateRowsAndAreas(NullableCSSValue, bool important); |
| 155 bool parseGridTemplateShorthand(bool important); | 155 bool parseGridTemplateShorthand(bool important); |
| 156 bool parseGridShorthand(bool important); | 156 bool parseGridShorthand(bool important); |
| 157 bool parseGridAreaShorthand(bool important); | 157 bool parseGridAreaShorthand(bool important); |
| 158 bool parseSingleGridAreaLonghand(RefPtrWillBeRawPtr<CSSValue>&); | 158 bool parseSingleGridAreaLonghand(NullableCSSValue&); |
| 159 PassRefPtrWillBeRawPtr<CSSValue> parseGridTrackList(); | 159 NullableCSSValue parseGridTrackList(); |
| 160 bool parseGridTrackRepeatFunction(CSSValueList&); | 160 bool parseGridTrackRepeatFunction(CSSValueList&); |
| 161 PassRefPtrWillBeRawPtr<CSSValue> parseGridTrackSize(CSSParserValueList& inpu
tList); | 161 NullableCSSValue parseGridTrackSize(CSSParserValueList& inputList); |
| 162 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseGridBreadth(CSSParserValue*); | 162 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseGridBreadth(CSSParserValue*); |
| 163 bool parseGridTemplateAreasRow(NamedGridAreaMap&, const size_t, size_t&); | 163 bool parseGridTemplateAreasRow(NamedGridAreaMap&, const size_t, size_t&); |
| 164 PassRefPtrWillBeRawPtr<CSSValue> parseGridTemplateAreas(); | 164 NullableCSSValue parseGridTemplateAreas(); |
| 165 bool parseGridLineNames(CSSParserValueList&, CSSValueList&, CSSGridLineNames
Value* = nullptr); | 165 bool parseGridLineNames(CSSParserValueList&, CSSValueList&, NullableCSSValue
= nullptr); |
| 166 PassRefPtrWillBeRawPtr<CSSValue> parseGridAutoFlow(CSSParserValueList&); | 166 NullableCSSValue parseGridAutoFlow(CSSParserValueList&); |
| 167 | 167 |
| 168 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseClipShape(); | 168 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseClipShape(); |
| 169 | 169 |
| 170 bool parseLegacyPosition(CSSPropertyID, bool important); | 170 bool parseLegacyPosition(CSSPropertyID, bool important); |
| 171 bool parseItemPositionOverflowPosition(CSSPropertyID, bool important); | 171 bool parseItemPositionOverflowPosition(CSSPropertyID, bool important); |
| 172 PassRefPtrWillBeRawPtr<CSSValue> parseContentDistributionOverflowPosition(); | 172 NullableCSSValue parseContentDistributionOverflowPosition(); |
| 173 | 173 |
| 174 PassRefPtrWillBeRawPtr<CSSValue> parseShapeProperty(CSSPropertyID propId); | 174 NullableCSSValue parseShapeProperty(CSSPropertyID propId); |
| 175 PassRefPtrWillBeRawPtr<CSSValue> parseBasicShapeAndOrBox(); | 175 NullableCSSValue parseBasicShapeAndOrBox(); |
| 176 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseBasicShape(); | 176 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseBasicShape(); |
| 177 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseShapeRadius(CSSParserValue*); | 177 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseShapeRadius(CSSParserValue*); |
| 178 | 178 |
| 179 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapeCircle(CSSParserValueLi
st* args); | 179 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapeCircle(CSSParserValueLi
st* args); |
| 180 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapeEllipse(CSSParserValueL
ist* args); | 180 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapeEllipse(CSSParserValueL
ist* args); |
| 181 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapePolygon(CSSParserValueL
ist* args); | 181 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapePolygon(CSSParserValueL
ist* args); |
| 182 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapeInset(CSSParserValueLis
t* args); | 182 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapeInset(CSSParserValueLis
t* args); |
| 183 | 183 |
| 184 bool parseFont(bool important); | 184 bool parseFont(bool important); |
| 185 void parseSystemFont(bool important); | 185 void parseSystemFont(bool important); |
| 186 PassRefPtrWillBeRawPtr<CSSValueList> parseFontFamily(); | 186 PassRefPtrWillBeRawPtr<CSSValueList> parseFontFamily(); |
| 187 | 187 |
| 188 PassRefPtrWillBeRawPtr<CSSValue> parseCounter(int defaultValue); | 188 NullableCSSValue parseCounter(int defaultValue); |
| 189 PassRefPtrWillBeRawPtr<CSSValue> parseCounterContent(CSSParserValueList* arg
s, bool counters); | 189 NullableCSSValue parseCounterContent(CSSParserValueList* args, bool counters
); |
| 190 | 190 |
| 191 bool parseColorParameters(const CSSParserValue*, int* colorValues, bool pars
eAlpha); | 191 bool parseColorParameters(const CSSParserValue*, int* colorValues, bool pars
eAlpha); |
| 192 bool parseHSLParameters(const CSSParserValue*, double* colorValues, bool par
seAlpha); | 192 bool parseHSLParameters(const CSSParserValue*, double* colorValues, bool par
seAlpha); |
| 193 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseColor(const CSSParserValue*,
bool acceptQuirkyColors = false); | 193 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseColor(const CSSParserValue*,
bool acceptQuirkyColors = false); |
| 194 bool parseColorFromValue(const CSSParserValue*, RGBA32&, bool acceptQuirkyCo
lors = false); | 194 bool parseColorFromValue(const CSSParserValue*, RGBA32&, bool acceptQuirkyCo
lors = false); |
| 195 | 195 |
| 196 bool acceptQuirkyColors(CSSPropertyID) const; | 196 bool acceptQuirkyColors(CSSPropertyID) const; |
| 197 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseBackgroundColor(const CSSPars
erValue*); | 197 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseBackgroundColor(const CSSPars
erValue*); |
| 198 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseTapHighlightColor(const CSSPa
rserValue*); | 198 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseTapHighlightColor(const CSSPa
rserValue*); |
| 199 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseGradientStopColor(const CSSPa
rserValue*); | 199 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseGradientStopColor(const CSSPa
rserValue*); |
| 200 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseDeprecatedGradientStopColor(c
onst CSSParserValue*); | 200 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseDeprecatedGradientStopColor(c
onst CSSParserValue*); |
| 201 | 201 |
| 202 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseLineHeight(); | 202 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseLineHeight(); |
| 203 bool parseFontSize(bool important); | 203 bool parseFontSize(bool important); |
| 204 bool parseFontVariant(bool important); | 204 bool parseFontVariant(bool important); |
| 205 bool parseFontWeight(bool important); | 205 bool parseFontWeight(bool important); |
| 206 PassRefPtrWillBeRawPtr<CSSValueList> parseFontFaceSrc(); | 206 PassRefPtrWillBeRawPtr<CSSValueList> parseFontFaceSrc(); |
| 207 PassRefPtrWillBeRawPtr<CSSValueList> parseFontFaceUnicodeRange(); | 207 PassRefPtrWillBeRawPtr<CSSValueList> parseFontFaceUnicodeRange(); |
| 208 | 208 |
| 209 bool parseSVGValue(CSSPropertyID propId, bool important); | 209 bool parseSVGValue(CSSPropertyID propId, bool important); |
| 210 PassRefPtrWillBeRawPtr<CSSValue> parseSVGStrokeDasharray(); | 210 NullableCSSValue parseSVGStrokeDasharray(); |
| 211 | 211 |
| 212 PassRefPtrWillBeRawPtr<CSSValue> parsePaintOrder() const; | 212 NullableCSSValue parsePaintOrder() const; |
| 213 | 213 |
| 214 // CSS3 Parsing Routines (for properties specific to CSS3) | 214 // CSS3 Parsing Routines (for properties specific to CSS3) |
| 215 PassRefPtrWillBeRawPtr<CSSValueList> parseShadow(CSSParserValueList*, CSSPro
pertyID); | 215 PassRefPtrWillBeRawPtr<CSSValueList> parseShadow(CSSParserValueList*, CSSPro
pertyID); |
| 216 bool parseBorderImageShorthand(CSSPropertyID, bool important); | 216 bool parseBorderImageShorthand(CSSPropertyID, bool important); |
| 217 PassRefPtrWillBeRawPtr<CSSValue> parseBorderImage(CSSPropertyID); | 217 NullableCSSValue parseBorderImage(CSSPropertyID); |
| 218 bool parseBorderImageRepeat(RefPtrWillBeRawPtr<CSSValue>&); | 218 bool parseBorderImageRepeat(NullableCSSValue&); |
| 219 bool parseBorderImageSlice(CSSPropertyID, RefPtrWillBeRawPtr<CSSBorderImageS
liceValue>&); | 219 bool parseBorderImageSlice(CSSPropertyID, RefPtrWillBeRawPtr<CSSBorderImageS
liceValue>&); |
| 220 bool parseBorderImageWidth(RefPtrWillBeRawPtr<CSSPrimitiveValue>&); | 220 bool parseBorderImageWidth(RefPtrWillBeRawPtr<CSSPrimitiveValue>&); |
| 221 bool parseBorderImageOutset(RefPtrWillBeRawPtr<CSSPrimitiveValue>&); | 221 bool parseBorderImageOutset(RefPtrWillBeRawPtr<CSSPrimitiveValue>&); |
| 222 bool parseBorderRadius(CSSPropertyID, bool important); | 222 bool parseBorderRadius(CSSPropertyID, bool important); |
| 223 | 223 |
| 224 PassRefPtrWillBeRawPtr<CSSValue> parseReflect(); | 224 NullableCSSValue parseReflect(); |
| 225 | 225 |
| 226 bool parseFlex(CSSParserValueList* args, bool important); | 226 bool parseFlex(CSSParserValueList* args, bool important); |
| 227 | 227 |
| 228 PassRefPtrWillBeRawPtr<CSSValue> parsePosition(CSSParserValueList*); | 228 NullableCSSValue parsePosition(CSSParserValueList*); |
| 229 PassRefPtrWillBeRawPtr<CSSValueList> parsePositionList(CSSParserValueList*); | 229 NullableCSSValue parsePositionList(CSSParserValueList*); |
| 230 | 230 |
| 231 // Image generators | 231 // Image generators |
| 232 bool parseCanvas(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&); | 232 bool parseCanvas(CSSParserValueList*, NullableCSSValue&); |
| 233 | 233 |
| 234 bool parseDeprecatedGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValu
e>&); | 234 bool parseDeprecatedGradient(CSSParserValueList*, NullableCSSValue&); |
| 235 bool parseDeprecatedLinearGradient(CSSParserValueList*, RefPtrWillBeRawPtr<C
SSValue>&, CSSGradientRepeat repeating); | 235 bool parseDeprecatedLinearGradient(CSSParserValueList*, NullableCSSValue&, C
SSGradientRepeat repeating); |
| 236 bool parseDeprecatedRadialGradient(CSSParserValueList*, RefPtrWillBeRawPtr<C
SSValue>&, CSSGradientRepeat repeating); | 236 bool parseDeprecatedRadialGradient(CSSParserValueList*, NullableCSSValue&, C
SSGradientRepeat repeating); |
| 237 bool parseLinearGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&,
CSSGradientRepeat repeating); | 237 bool parseLinearGradient(CSSParserValueList*, NullableCSSValue&, CSSGradient
Repeat repeating); |
| 238 bool parseRadialGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&,
CSSGradientRepeat repeating); | 238 bool parseRadialGradient(CSSParserValueList*, NullableCSSValue&, CSSGradient
Repeat repeating); |
| 239 bool parseGradientColorStops(CSSParserValueList*, CSSGradientValue*, bool ex
pectComma); | 239 bool parseGradientColorStops(CSSParserValueList*, CSSGradientValue*, bool ex
pectComma); |
| 240 | 240 |
| 241 bool parseCrossfade(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&); | 241 bool parseCrossfade(CSSParserValueList*, NullableCSSValue&); |
| 242 | 242 |
| 243 PassRefPtrWillBeRawPtr<CSSValue> parseImageSet(CSSParserValueList*); | 243 NullableCSSValue parseImageSet(CSSParserValueList*); |
| 244 | 244 |
| 245 PassRefPtrWillBeRawPtr<CSSValue> parseWillChange(); | 245 NullableCSSValue parseWillChange(); |
| 246 | 246 |
| 247 PassRefPtrWillBeRawPtr<CSSValueList> parseFilter(); | 247 PassRefPtrWillBeRawPtr<CSSValueList> parseFilter(); |
| 248 PassRefPtrWillBeRawPtr<CSSFunctionValue> parseBuiltinFilterArguments(CSSPars
erValueList*, CSSValueID); | 248 PassRefPtrWillBeRawPtr<CSSFunctionValue> parseBuiltinFilterArguments(CSSPars
erValueList*, CSSValueID); |
| 249 | 249 |
| 250 PassRefPtrWillBeRawPtr<CSSValueList> parseTransformOrigin(); | 250 PassRefPtrWillBeRawPtr<CSSValueList> parseTransformOrigin(); |
| 251 PassRefPtrWillBeRawPtr<CSSValueList> parseTransform(bool useLegacyParsing); | 251 PassRefPtrWillBeRawPtr<CSSValueList> parseTransform(bool useLegacyParsing); |
| 252 PassRefPtrWillBeRawPtr<CSSValue> parseTransformValue(bool useLegacyParsing,
CSSParserValue*); | 252 NullableCSSValue parseTransformValue(bool useLegacyParsing, CSSParserValue*)
; |
| 253 | 253 |
| 254 PassRefPtrWillBeRawPtr<CSSValue> parseMotionPath(); | 254 NullableCSSValue parseMotionPath(); |
| 255 PassRefPtrWillBeRawPtr<CSSValue> parseMotionRotation(); | 255 NullableCSSValue parseMotionRotation(); |
| 256 | 256 |
| 257 PassRefPtrWillBeRawPtr<CSSValue> parseTextEmphasisStyle(); | 257 NullableCSSValue parseTextEmphasisStyle(); |
| 258 | 258 |
| 259 PassRefPtrWillBeRawPtr<CSSValue> parseTouchAction(); | 259 NullableCSSValue parseTouchAction(); |
| 260 PassRefPtrWillBeRawPtr<CSSValue> parseScrollBlocksOn(); | 260 NullableCSSValue parseScrollBlocksOn(); |
| 261 | 261 |
| 262 void addTextDecorationProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValu
e>, bool important); | 262 void addTextDecorationProperty(CSSPropertyID, CSSValue, bool important); |
| 263 bool parseTextDecoration(CSSPropertyID propId, bool important); | 263 bool parseTextDecoration(CSSPropertyID propId, bool important); |
| 264 | 264 |
| 265 PassRefPtrWillBeRawPtr<CSSValue> parseTextIndent(); | 265 NullableCSSValue parseTextIndent(); |
| 266 | 266 |
| 267 PassRefPtrWillBeRawPtr<CSSLineBoxContainValue> parseLineBoxContain(); | 267 PassRefPtrWillBeRawPtr<CSSLineBoxContainValue> parseLineBoxContain(); |
| 268 bool parseCalculation(CSSParserValue*, ValueRange); | 268 bool parseCalculation(CSSParserValue*, ValueRange); |
| 269 | 269 |
| 270 bool parseFontFeatureTag(CSSValueList*); | 270 bool parseFontFeatureTag(CSSValueList*); |
| 271 PassRefPtrWillBeRawPtr<CSSValue> parseFontFeatureSettings(); | 271 NullableCSSValue parseFontFeatureSettings(); |
| 272 | 272 |
| 273 bool parseFontVariantLigatures(bool important); | 273 bool parseFontVariantLigatures(bool important); |
| 274 | 274 |
| 275 bool parseGeneratedImage(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&)
; | 275 bool parseGeneratedImage(CSSParserValueList*, NullableCSSValue&); |
| 276 | 276 |
| 277 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveNumericValue(CSSPar
serValue*); | 277 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveNumericValue(CSSPar
serValue*); |
| 278 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveStringValue(CSSPars
erValue*); | 278 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveStringValue(CSSPars
erValue*); |
| 279 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveCustomIdentValue(CS
SParserValue*); | 279 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveCustomIdentValue(CS
SParserValue*); |
| 280 | 280 |
| 281 PassRefPtrWillBeRawPtr<CSSValue> createCSSImageValueWithReferrer(const Strin
g& rawValue, const KURL&); | 281 CSSValue createCSSImageValueWithReferrer(const String& rawValue, const KURL&
); |
| 282 | 282 |
| 283 PassRefPtrWillBeRawPtr<CSSBasicShape> parseInsetRoundedCorners(PassRefPtrWil
lBeRawPtr<CSSBasicShapeInset>, CSSParserValueList*); | 283 PassRefPtrWillBeRawPtr<CSSBasicShape> parseInsetRoundedCorners(PassRefPtrWil
lBeRawPtr<CSSBasicShapeInset>, CSSParserValueList*); |
| 284 | 284 |
| 285 enum SizeParameterType { | 285 enum SizeParameterType { |
| 286 None, | 286 None, |
| 287 Auto, | 287 Auto, |
| 288 Length, | 288 Length, |
| 289 PageSize, | 289 PageSize, |
| 290 Orientation, | 290 Orientation, |
| 291 }; | 291 }; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 bool validUnit(CSSParserValue*, Units, CSSParserMode, ReleaseParsedCalcValue
Condition releaseCalc = DoNotReleaseParsedCalcValue); | 354 bool validUnit(CSSParserValue*, Units, CSSParserMode, ReleaseParsedCalcValue
Condition releaseCalc = DoNotReleaseParsedCalcValue); |
| 355 | 355 |
| 356 bool parseBorderImageQuad(Units, RefPtrWillBeRawPtr<CSSPrimitiveValue>&); | 356 bool parseBorderImageQuad(Units, RefPtrWillBeRawPtr<CSSPrimitiveValue>&); |
| 357 int colorIntFromValue(CSSParserValue*); | 357 int colorIntFromValue(CSSParserValue*); |
| 358 bool isCalculation(CSSParserValue*); | 358 bool isCalculation(CSSParserValue*); |
| 359 | 359 |
| 360 bool buildBorderImageParseContext(CSSPropertyID, BorderImageParseContext&); | 360 bool buildBorderImageParseContext(CSSPropertyID, BorderImageParseContext&); |
| 361 | 361 |
| 362 bool parseDeprecatedGradientColorStop(CSSParserValue*, CSSGradientColorStop&
); | 362 bool parseDeprecatedGradientColorStop(CSSParserValue*, CSSGradientColorStop&
); |
| 363 | 363 |
| 364 void commitBorderImageProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValu
e>, bool important); | 364 void commitBorderImageProperty(CSSPropertyID, NullableCSSValue, bool importa
nt); |
| 365 | 365 |
| 366 PassRefPtrWillBeRawPtr<CSSValue> parseScrollSnapPoints(); | 366 NullableCSSValue parseScrollSnapPoints(); |
| 367 PassRefPtrWillBeRawPtr<CSSValue> parseScrollSnapDestination(); | 367 NullableCSSValue parseScrollSnapDestination(); |
| 368 PassRefPtrWillBeRawPtr<CSSValue> parseScrollSnapCoordinate(); | 368 NullableCSSValue parseScrollSnapCoordinate(); |
| 369 PassRefPtrWillBeRawPtr<CSSValue> parseScrollSnapPosition(); | 369 NullableCSSValue parseScrollSnapPosition(); |
| 370 | 370 |
| 371 private: | 371 private: |
| 372 // Inputs: | 372 // Inputs: |
| 373 CSSParserValueList* m_valueList; | 373 CSSParserValueList* m_valueList; |
| 374 const CSSParserContext& m_context; | 374 const CSSParserContext& m_context; |
| 375 | 375 |
| 376 // Outputs: | 376 // Outputs: |
| 377 WillBeHeapVector<CSSProperty, 256>& m_parsedProperties; | 377 WillBeHeapVector<CSSProperty, 256>& m_parsedProperties; |
| 378 StyleRule::Type m_ruleType; | 378 StyleRule::Type m_ruleType; |
| 379 | 379 |
| 380 // Locals during parsing: | 380 // Locals during parsing: |
| 381 int m_inParseShorthand; | 381 int m_inParseShorthand; |
| 382 CSSPropertyID m_currentShorthand; | 382 CSSPropertyID m_currentShorthand; |
| 383 bool m_implicitShorthand; | 383 bool m_implicitShorthand; |
| 384 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation; | 384 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation; |
| 385 }; | 385 }; |
| 386 | 386 |
| 387 CSSPropertyID unresolvedCSSPropertyID(const CSSParserString&); | 387 CSSPropertyID unresolvedCSSPropertyID(const CSSParserString&); |
| 388 CSSValueID cssValueKeywordID(const CSSParserString&); | 388 CSSValueID cssValueKeywordID(const CSSParserString&); |
| 389 | 389 |
| 390 } // namespace blink | 390 } // namespace blink |
| 391 | 391 |
| 392 #endif // CSSPropertyParser_h | 392 #endif // CSSPropertyParser_h |
| OLD | NEW |