| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 void parseSheet(StyleSheetContents*, const String&, const TextPosition& star
tPosition = TextPosition::minimumPosition(), CSSParserObserver* = 0, bool = fals
e); | 90 void parseSheet(StyleSheetContents*, const String&, const TextPosition& star
tPosition = TextPosition::minimumPosition(), CSSParserObserver* = 0, bool = fals
e); |
| 91 PassRefPtrWillBeRawPtr<StyleRuleBase> parseRule(StyleSheetContents*, const S
tring&); | 91 PassRefPtrWillBeRawPtr<StyleRuleBase> parseRule(StyleSheetContents*, const S
tring&); |
| 92 PassRefPtrWillBeRawPtr<StyleKeyframe> parseKeyframeRule(StyleSheetContents*,
const String&); | 92 PassRefPtrWillBeRawPtr<StyleKeyframe> parseKeyframeRule(StyleSheetContents*,
const String&); |
| 93 bool parseSupportsCondition(const String&); | 93 bool parseSupportsCondition(const String&); |
| 94 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String
&, bool important, CSSParserMode, StyleSheetContents*); | 94 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String
&, bool important, CSSParserMode, StyleSheetContents*); |
| 95 static bool parseColor(RGBA32& color, const String&, bool strict = false); | 95 static bool parseColor(RGBA32& color, const String&, bool strict = false); |
| 96 static bool parseSystemColor(RGBA32& color, const String&); | 96 static bool parseSystemColor(RGBA32& color, const String&); |
| 97 static PassRefPtrWillBeRawPtr<CSSValueList> parseFontFaceValue(const AtomicS
tring&); | 97 static PassRefPtrWillBeRawPtr<CSSValueList> parseFontFaceValue(const AtomicS
tring&); |
| 98 static PassRefPtrWillBeRawPtr<CSSValue> parseAnimationTimingFunctionValue(co
nst String&); | 98 static PassRefPtrWillBeRawPtr<CSSValue> parseAnimationTimingFunctionValue(co
nst String&); |
| 99 bool parseDeclaration(MutableStylePropertySet*, const String&, CSSParserObse
rver*, StyleSheetContents* contextStyleSheet); | 99 bool parseDeclaration(MutableStylePropertySet*, const String&, CSSParserObse
rver*, StyleSheetContents* contextStyleSheet); |
| 100 static PassRefPtr<ImmutableStylePropertySet> parseInlineStyleDeclaration(con
st String&, Element*); | 100 static PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> parseInlineStyleDec
laration(const String&, Element*); |
| 101 PassRefPtrWillBeRawPtr<MediaQuerySet> parseMediaQueryList(const String&); | 101 PassRefPtrWillBeRawPtr<MediaQuerySet> parseMediaQueryList(const String&); |
| 102 PassOwnPtr<Vector<double> > parseKeyframeKeyList(const String&); | 102 PassOwnPtr<Vector<double> > parseKeyframeKeyList(const String&); |
| 103 | 103 |
| 104 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String
&, bool important, const Document&); | 104 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String
&, bool important, const Document&); |
| 105 | 105 |
| 106 bool parseValue(CSSPropertyID, bool important); | 106 bool parseValue(CSSPropertyID, bool important); |
| 107 void parseSelector(const String&, CSSSelectorList&); | 107 void parseSelector(const String&, CSSSelectorList&); |
| 108 | 108 |
| 109 CSSParserSelector* createFloatingSelector(); | 109 CSSParserSelector* createFloatingSelector(); |
| 110 CSSParserSelector* createFloatingSelectorWithTagName(const QualifiedName&); | 110 CSSParserSelector* createFloatingSelectorWithTagName(const QualifiedName&); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 CSSParserSelector* rewriteSpecifiersWithNamespaceIfNeeded(CSSParserSelector*
); | 165 CSSParserSelector* rewriteSpecifiersWithNamespaceIfNeeded(CSSParserSelector*
); |
| 166 CSSParserSelector* rewriteSpecifiers(CSSParserSelector*, CSSParserSelector*)
; | 166 CSSParserSelector* rewriteSpecifiers(CSSParserSelector*, CSSParserSelector*)
; |
| 167 CSSParserSelector* rewriteSpecifiersForShadowDistributed(CSSParserSelector*
specifiers, CSSParserSelector* distributedPseudoElementSelector); | 167 CSSParserSelector* rewriteSpecifiersForShadowDistributed(CSSParserSelector*
specifiers, CSSParserSelector* distributedPseudoElementSelector); |
| 168 | 168 |
| 169 void invalidBlockHit(); | 169 void invalidBlockHit(); |
| 170 | 170 |
| 171 Vector<OwnPtr<CSSParserSelector> >* reusableSelectorVector() { return &m_reu
sableSelectorVector; } | 171 Vector<OwnPtr<CSSParserSelector> >* reusableSelectorVector() { return &m_reu
sableSelectorVector; } |
| 172 | 172 |
| 173 void clearProperties(); | 173 void clearProperties(); |
| 174 | 174 |
| 175 PassRefPtr<ImmutableStylePropertySet> createStylePropertySet(); | 175 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> createStylePropertySet(); |
| 176 | 176 |
| 177 CSSParserContext m_context; | 177 CSSParserContext m_context; |
| 178 | 178 |
| 179 bool m_important; | 179 bool m_important; |
| 180 CSSPropertyID m_id; | 180 CSSPropertyID m_id; |
| 181 RawPtrWillBeMember<StyleSheetContents> m_styleSheet; | 181 RawPtrWillBeMember<StyleSheetContents> m_styleSheet; |
| 182 RefPtrWillBeMember<StyleRuleBase> m_rule; | 182 RefPtrWillBeMember<StyleRuleBase> m_rule; |
| 183 RefPtrWillBeMember<StyleKeyframe> m_keyframe; | 183 RefPtrWillBeMember<StyleKeyframe> m_keyframe; |
| 184 RefPtrWillBeMember<MediaQuerySet> m_mediaList; | 184 RefPtrWillBeMember<MediaQuerySet> m_mediaList; |
| 185 OwnPtr<CSSParserValueList> m_valueList; | 185 OwnPtr<CSSParserValueList> m_valueList; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 void recheckAtKeyword(const UChar* str, int len); | 260 void recheckAtKeyword(const UChar* str, int len); |
| 261 | 261 |
| 262 template<unsigned prefixLength, unsigned suffixLength> | 262 template<unsigned prefixLength, unsigned suffixLength> |
| 263 inline void setupParser(const char (&prefix)[prefixLength], const String& st
ring, const char (&suffix)[suffixLength]) | 263 inline void setupParser(const char (&prefix)[prefixLength], const String& st
ring, const char (&suffix)[suffixLength]) |
| 264 { | 264 { |
| 265 setupParser(prefix, prefixLength - 1, string, suffix, suffixLength - 1); | 265 setupParser(prefix, prefixLength - 1, string, suffix, suffixLength - 1); |
| 266 } | 266 } |
| 267 void setupParser(const char* prefix, unsigned prefixLength, const String&, c
onst char* suffix, unsigned suffixLength); | 267 void setupParser(const char* prefix, unsigned prefixLength, const String&, c
onst char* suffix, unsigned suffixLength); |
| 268 | 268 |
| 269 bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String&, bool
important, StyleSheetContents* contextStyleSheet); | 269 bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String&, bool
important, StyleSheetContents* contextStyleSheet); |
| 270 PassRefPtr<ImmutableStylePropertySet> parseDeclaration(const String&, StyleS
heetContents* contextStyleSheet); | 270 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> parseDeclaration(const Str
ing&, StyleSheetContents* contextStyleSheet); |
| 271 | 271 |
| 272 bool parseColor(const String&); | 272 bool parseColor(const String&); |
| 273 | 273 |
| 274 const String* m_source; | 274 const String* m_source; |
| 275 TextPosition m_startPosition; | 275 TextPosition m_startPosition; |
| 276 CSSRuleSourceData::Type m_ruleHeaderType; | 276 CSSRuleSourceData::Type m_ruleHeaderType; |
| 277 unsigned m_ruleHeaderStartOffset; | 277 unsigned m_ruleHeaderStartOffset; |
| 278 int m_ruleHeaderStartLineNumber; | 278 int m_ruleHeaderStartLineNumber; |
| 279 OwnPtr<Vector<unsigned> > m_lineEndings; | 279 OwnPtr<Vector<unsigned> > m_lineEndings; |
| 280 | 280 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 inline int cssyylex(void* yylval, BisonCSSParser* parser) | 318 inline int cssyylex(void* yylval, BisonCSSParser* parser) |
| 319 { | 319 { |
| 320 return parser->m_tokenizer.lex(yylval); | 320 return parser->m_tokenizer.lex(yylval); |
| 321 } | 321 } |
| 322 | 322 |
| 323 bool isValidNthToken(const CSSParserString&); | 323 bool isValidNthToken(const CSSParserString&); |
| 324 | 324 |
| 325 } // namespace WebCore | 325 } // namespace WebCore |
| 326 | 326 |
| 327 #endif // BisonCSSParser_h | 327 #endif // BisonCSSParser_h |
| OLD | NEW |