| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 class CSSPrimitiveValue; | 48 class CSSPrimitiveValue; |
| 49 class CSSSelectorList; | 49 class CSSSelectorList; |
| 50 class CSSValue; | 50 class CSSValue; |
| 51 class CSSValueList; | 51 class CSSValueList; |
| 52 class CSSBasicShape; | 52 class CSSBasicShape; |
| 53 class Document; | 53 class Document; |
| 54 class Element; | 54 class Element; |
| 55 class ImmutableStylePropertySet; | 55 class ImmutableStylePropertySet; |
| 56 class MediaQueryExp; | 56 class MediaQueryExp; |
| 57 class MediaQuerySet; | 57 class MediaQuerySet; |
| 58 class MutableStylePropertySet; |
| 58 class StyleKeyframe; | 59 class StyleKeyframe; |
| 59 class StylePropertySet; | |
| 60 class StylePropertyShorthand; | 60 class StylePropertyShorthand; |
| 61 class StyleRuleBase; | 61 class StyleRuleBase; |
| 62 class StyleRuleKeyframes; | 62 class StyleRuleKeyframes; |
| 63 class StyleKeyframe; | 63 class StyleKeyframe; |
| 64 class StyleSheetContents; | 64 class StyleSheetContents; |
| 65 class StyledElement; | 65 class StyledElement; |
| 66 | 66 |
| 67 class WebKitCSSArrayFunctionValue; | 67 class WebKitCSSArrayFunctionValue; |
| 68 class WebKitCSSMixFunctionValue; | 68 class WebKitCSSMixFunctionValue; |
| 69 class WebKitCSSShaderValue; | 69 class WebKitCSSShaderValue; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 CSSParser(const CSSParserContext&, UseCounter* = 0); | 88 CSSParser(const CSSParserContext&, UseCounter* = 0); |
| 89 | 89 |
| 90 ~CSSParser(); | 90 ~CSSParser(); |
| 91 | 91 |
| 92 void parseSheet(StyleSheetContents*, const String&, int startLineNumber = 0,
SourceDataHandler* = 0, bool = false); | 92 void parseSheet(StyleSheetContents*, const String&, int startLineNumber = 0,
SourceDataHandler* = 0, bool = false); |
| 93 PassRefPtr<StyleRuleBase> parseRule(StyleSheetContents*, const String&); | 93 PassRefPtr<StyleRuleBase> parseRule(StyleSheetContents*, const String&); |
| 94 PassRefPtr<StyleKeyframe> parseKeyframeRule(StyleSheetContents*, const Strin
g&); | 94 PassRefPtr<StyleKeyframe> parseKeyframeRule(StyleSheetContents*, const Strin
g&); |
| 95 bool parseSupportsCondition(const String&); | 95 bool parseSupportsCondition(const String&); |
| 96 static bool parseValue(StylePropertySet*, CSSPropertyID, const String&, bool
important, CSSParserMode, StyleSheetContents*); | 96 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String
&, bool important, CSSParserMode, StyleSheetContents*); |
| 97 static bool parseColor(RGBA32& color, const String&, bool strict = false); | 97 static bool parseColor(RGBA32& color, const String&, bool strict = false); |
| 98 static bool parseSystemColor(RGBA32& color, const String&, Document*); | 98 static bool parseSystemColor(RGBA32& color, const String&, Document*); |
| 99 static PassRefPtr<CSSValueList> parseFontFaceValue(const AtomicString&); | 99 static PassRefPtr<CSSValueList> parseFontFaceValue(const AtomicString&); |
| 100 PassRefPtr<CSSPrimitiveValue> parseValidPrimitive(int ident, CSSParserValue*
); | 100 PassRefPtr<CSSPrimitiveValue> parseValidPrimitive(int ident, CSSParserValue*
); |
| 101 bool parseDeclaration(StylePropertySet*, const String&, SourceDataHandler*,
StyleSheetContents* contextStyleSheet); | 101 bool parseDeclaration(MutableStylePropertySet*, const String&, SourceDataHan
dler*, StyleSheetContents* contextStyleSheet); |
| 102 static PassRefPtr<ImmutableStylePropertySet> parseInlineStyleDeclaration(con
st String&, Element*); | 102 static PassRefPtr<ImmutableStylePropertySet> parseInlineStyleDeclaration(con
st String&, Element*); |
| 103 PassOwnPtr<MediaQuery> parseMediaQuery(const String&); | 103 PassOwnPtr<MediaQuery> parseMediaQuery(const String&); |
| 104 | 104 |
| 105 void addPropertyWithPrefixingVariant(CSSPropertyID, PassRefPtr<CSSValue>, bo
ol important, bool implicit = false); | 105 void addPropertyWithPrefixingVariant(CSSPropertyID, PassRefPtr<CSSValue>, bo
ol important, bool implicit = false); |
| 106 void addProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important, bool i
mplicit = false); | 106 void addProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important, bool i
mplicit = false); |
| 107 void rollbackLastProperties(int num); | 107 void rollbackLastProperties(int num); |
| 108 bool hasProperties() const { return !m_parsedProperties.isEmpty(); } | 108 bool hasProperties() const { return !m_parsedProperties.isEmpty(); } |
| 109 void addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtr<CSSValue>,
bool); | 109 void addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtr<CSSValue>,
bool); |
| 110 void setCurrentProperty(CSSPropertyID); | 110 void setCurrentProperty(CSSPropertyID); |
| 111 | 111 |
| 112 bool parseValue(CSSPropertyID, bool important); | 112 bool parseValue(CSSPropertyID, bool important); |
| 113 bool parseShorthand(CSSPropertyID, const StylePropertyShorthand&, bool impor
tant); | 113 bool parseShorthand(CSSPropertyID, const StylePropertyShorthand&, bool impor
tant); |
| 114 bool parse4Values(CSSPropertyID, const CSSPropertyID* properties, bool impor
tant); | 114 bool parse4Values(CSSPropertyID, const CSSPropertyID* properties, bool impor
tant); |
| 115 bool parseContent(CSSPropertyID, bool important); | 115 bool parseContent(CSSPropertyID, bool important); |
| 116 bool parseQuotes(CSSPropertyID, bool important); | 116 bool parseQuotes(CSSPropertyID, bool important); |
| 117 | 117 |
| 118 static bool parseValue(StylePropertySet*, CSSPropertyID, const String&, bool
important, Document*); | 118 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String
&, bool important, Document*); |
| 119 bool cssVariablesEnabled() const; | 119 bool cssVariablesEnabled() const; |
| 120 void storeVariableDeclaration(const CSSParserString&, PassOwnPtr<CSSParserVa
lueList>, bool important); | 120 void storeVariableDeclaration(const CSSParserString&, PassOwnPtr<CSSParserVa
lueList>, bool important); |
| 121 | 121 |
| 122 PassRefPtr<CSSValue> parseAttr(CSSParserValueList* args); | 122 PassRefPtr<CSSValue> parseAttr(CSSParserValueList* args); |
| 123 | 123 |
| 124 PassRefPtr<CSSValue> parseBackgroundColor(); | 124 PassRefPtr<CSSValue> parseBackgroundColor(); |
| 125 | 125 |
| 126 bool parseFillImage(CSSParserValueList*, RefPtr<CSSValue>&); | 126 bool parseFillImage(CSSParserValueList*, RefPtr<CSSValue>&); |
| 127 | 127 |
| 128 enum FillPositionFlag { InvalidFillPosition = 0, AmbiguousFillPosition = 1,
XFillPosition = 2, YFillPosition = 4 }; | 128 enum FillPositionFlag { InvalidFillPosition = 0, AmbiguousFillPosition = 1,
XFillPosition = 2, YFillPosition = 4 }; |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 void setupParser(const char* prefix, unsigned prefixLength, const String&, c
onst char* suffix, unsigned suffixLength); | 524 void setupParser(const char* prefix, unsigned prefixLength, const String&, c
onst char* suffix, unsigned suffixLength); |
| 525 bool inShorthand() const { return m_inParseShorthand; } | 525 bool inShorthand() const { return m_inParseShorthand; } |
| 526 | 526 |
| 527 bool validWidthOrHeight(CSSParserValue*); | 527 bool validWidthOrHeight(CSSParserValue*); |
| 528 | 528 |
| 529 void deleteFontFaceOnlyValues(); | 529 void deleteFontFaceOnlyValues(); |
| 530 | 530 |
| 531 bool isGeneratedImageValue(CSSParserValue*) const; | 531 bool isGeneratedImageValue(CSSParserValue*) const; |
| 532 bool parseGeneratedImage(CSSParserValueList*, RefPtr<CSSValue>&); | 532 bool parseGeneratedImage(CSSParserValueList*, RefPtr<CSSValue>&); |
| 533 | 533 |
| 534 bool parseValue(StylePropertySet*, CSSPropertyID, const String&, bool import
ant, StyleSheetContents* contextStyleSheet); | 534 bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String&, bool
important, StyleSheetContents* contextStyleSheet); |
| 535 PassRefPtr<ImmutableStylePropertySet> parseDeclaration(const String&, StyleS
heetContents* contextStyleSheet); | 535 PassRefPtr<ImmutableStylePropertySet> parseDeclaration(const String&, StyleS
heetContents* contextStyleSheet); |
| 536 | 536 |
| 537 enum SizeParameterType { | 537 enum SizeParameterType { |
| 538 None, | 538 None, |
| 539 Auto, | 539 Auto, |
| 540 Length, | 540 Length, |
| 541 PageSize, | 541 PageSize, |
| 542 Orientation, | 542 Orientation, |
| 543 }; | 543 }; |
| 544 | 544 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 } | 737 } |
| 738 | 738 |
| 739 inline int cssyylex(void* yylval, CSSParser* parser) | 739 inline int cssyylex(void* yylval, CSSParser* parser) |
| 740 { | 740 { |
| 741 return parser->lex(yylval); | 741 return parser->lex(yylval); |
| 742 } | 742 } |
| 743 | 743 |
| 744 } // namespace WebCore | 744 } // namespace WebCore |
| 745 | 745 |
| 746 #endif // CSSParser_h | 746 #endif // CSSParser_h |
| OLD | NEW |