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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 PassRefPtr<StyleRuleBase> parseRule(StyleSheetContents*, const String&); | 94 PassRefPtr<StyleRuleBase> parseRule(StyleSheetContents*, const String&); |
95 PassRefPtr<StyleKeyframe> parseKeyframeRule(StyleSheetContents*, const Strin
g&); | 95 PassRefPtr<StyleKeyframe> parseKeyframeRule(StyleSheetContents*, const Strin
g&); |
96 bool parseSupportsCondition(const String&); | 96 bool parseSupportsCondition(const String&); |
97 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String
&, bool important, CSSParserMode, StyleSheetContents*); | 97 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String
&, bool important, CSSParserMode, StyleSheetContents*); |
98 static bool parseColor(RGBA32& color, const String&, bool strict = false); | 98 static bool parseColor(RGBA32& color, const String&, bool strict = false); |
99 static bool parseSystemColor(RGBA32& color, const String&, Document*); | 99 static bool parseSystemColor(RGBA32& color, const String&, Document*); |
100 static PassRefPtr<CSSValueList> parseFontFaceValue(const AtomicString&); | 100 static PassRefPtr<CSSValueList> parseFontFaceValue(const AtomicString&); |
101 PassRefPtr<CSSPrimitiveValue> parseValidPrimitive(CSSValueID ident, CSSParse
rValue*); | 101 PassRefPtr<CSSPrimitiveValue> parseValidPrimitive(CSSValueID ident, CSSParse
rValue*); |
102 bool parseDeclaration(MutableStylePropertySet*, const String&, SourceDataHan
dler*, StyleSheetContents* contextStyleSheet); | 102 bool parseDeclaration(MutableStylePropertySet*, const String&, SourceDataHan
dler*, StyleSheetContents* contextStyleSheet); |
103 static PassRefPtr<ImmutableStylePropertySet> parseInlineStyleDeclaration(con
st String&, Element*); | 103 static PassRefPtr<ImmutableStylePropertySet> parseInlineStyleDeclaration(con
st String&, Element*); |
104 PassOwnPtr<MediaQuery> parseMediaQuery(const String&); | 104 PassRefPtr<MediaQuerySet> parseMediaQueryList(const String&); |
105 | 105 |
106 void addPropertyWithPrefixingVariant(CSSPropertyID, PassRefPtr<CSSValue>, bo
ol important, bool implicit = false); | 106 void addPropertyWithPrefixingVariant(CSSPropertyID, PassRefPtr<CSSValue>, bo
ol important, bool implicit = false); |
107 void addProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important, bool i
mplicit = false); | 107 void addProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important, bool i
mplicit = false); |
108 void rollbackLastProperties(int num); | 108 void rollbackLastProperties(int num); |
109 bool hasProperties() const { return !m_parsedProperties.isEmpty(); } | 109 bool hasProperties() const { return !m_parsedProperties.isEmpty(); } |
110 void addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtr<CSSValue>,
bool); | 110 void addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtr<CSSValue>,
bool); |
111 void setCurrentProperty(CSSPropertyID); | 111 void setCurrentProperty(CSSPropertyID); |
112 | 112 |
113 bool parseValue(CSSPropertyID, bool important); | 113 bool parseValue(CSSPropertyID, bool important); |
114 bool parseShorthand(CSSPropertyID, const StylePropertyShorthand&, bool impor
tant); | 114 bool parseShorthand(CSSPropertyID, const StylePropertyShorthand&, bool impor
tant); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 | 349 |
350 PassRefPtr<ImmutableStylePropertySet> createStylePropertySet(); | 350 PassRefPtr<ImmutableStylePropertySet> createStylePropertySet(); |
351 | 351 |
352 CSSParserContext m_context; | 352 CSSParserContext m_context; |
353 | 353 |
354 bool m_important; | 354 bool m_important; |
355 CSSPropertyID m_id; | 355 CSSPropertyID m_id; |
356 StyleSheetContents* m_styleSheet; | 356 StyleSheetContents* m_styleSheet; |
357 RefPtr<StyleRuleBase> m_rule; | 357 RefPtr<StyleRuleBase> m_rule; |
358 RefPtr<StyleKeyframe> m_keyframe; | 358 RefPtr<StyleKeyframe> m_keyframe; |
359 OwnPtr<MediaQuery> m_mediaQuery; | 359 RefPtr<MediaQuerySet> m_mediaList; |
360 OwnPtr<CSSParserValueList> m_valueList; | 360 OwnPtr<CSSParserValueList> m_valueList; |
361 bool m_supportsCondition; | 361 bool m_supportsCondition; |
362 | 362 |
363 typedef Vector<CSSProperty, 256> ParsedPropertyVector; | 363 typedef Vector<CSSProperty, 256> ParsedPropertyVector; |
364 ParsedPropertyVector m_parsedProperties; | 364 ParsedPropertyVector m_parsedProperties; |
365 CSSSelectorList* m_selectorListForParseSelector; | 365 CSSSelectorList* m_selectorListForParseSelector; |
366 | 366 |
367 unsigned m_numParsedPropertiesBeforeMarginBox; | 367 unsigned m_numParsedPropertiesBeforeMarginBox; |
368 | 368 |
369 int m_inParseShorthand; | 369 int m_inParseShorthand; |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 } | 739 } |
740 | 740 |
741 inline int cssyylex(void* yylval, CSSParser* parser) | 741 inline int cssyylex(void* yylval, CSSParser* parser) |
742 { | 742 { |
743 return parser->lex(yylval); | 743 return parser->lex(yylval); |
744 } | 744 } |
745 | 745 |
746 } // namespace WebCore | 746 } // namespace WebCore |
747 | 747 |
748 #endif // CSSParser_h | 748 #endif // CSSParser_h |
OLD | NEW |