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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 FFrequency = 0x0040, | 65 FFrequency = 0x0040, |
66 FPositiveInteger = 0x0080, | 66 FPositiveInteger = 0x0080, |
67 FRelative = 0x0100, | 67 FRelative = 0x0100, |
68 FResolution = 0x0200, | 68 FResolution = 0x0200, |
69 FNonNeg = 0x0400, | 69 FNonNeg = 0x0400, |
70 FUnitlessQuirk = 0x0800 | 70 FUnitlessQuirk = 0x0800 |
71 }; | 71 }; |
72 | 72 |
73 static bool parseValue(CSSPropertyID, bool important, | 73 static bool parseValue(CSSPropertyID, bool important, |
74 CSSParserValueList*, const CSSParserContext&, bool inViewport, | 74 CSSParserValueList*, const CSSParserContext&, bool inViewport, |
75 WillBeHeapVector<CSSProperty, 256>&, CSSRuleSourceData::Type); | 75 WillBeHeapVector<CSSProperty, 256>&, StyleRule::Type); |
76 | 76 |
77 // FIXME: This should probably move to CSSParserFastPaths | 77 // FIXME: This should probably move to CSSParserFastPaths |
78 template<typename StringType> | 78 template<typename StringType> |
79 static bool fastParseColor(RGBA32&, const StringType&, bool strict); | 79 static bool fastParseColor(RGBA32&, const StringType&, bool strict); |
80 | 80 |
81 static bool isSystemColor(int id); | 81 static bool isSystemColor(int id); |
82 | 82 |
83 private: | 83 private: |
84 CSSPropertyParser(CSSParserValueList*, const CSSParserContext&, bool inViewp
ort, | 84 CSSPropertyParser(CSSParserValueList*, const CSSParserContext&, bool inViewp
ort, |
85 WillBeHeapVector<CSSProperty, 256>&, CSSRuleSourceData::Type); | 85 WillBeHeapVector<CSSProperty, 256>&, StyleRule::Type); |
86 | 86 |
87 bool parseValue(CSSPropertyID, bool important); | 87 bool parseValue(CSSPropertyID, bool important); |
88 | 88 |
89 bool inShorthand() const { return m_inParseShorthand; } | 89 bool inShorthand() const { return m_inParseShorthand; } |
90 bool inQuirksMode() const { return isQuirksModeBehavior(m_context.mode()); } | 90 bool inQuirksMode() const { return isQuirksModeBehavior(m_context.mode()); } |
91 | 91 |
92 bool inViewport() const { return m_inViewport; } | 92 bool inViewport() const { return m_inViewport; } |
93 bool parseViewportProperty(CSSPropertyID propId, bool important); | 93 bool parseViewportProperty(CSSPropertyID propId, bool important); |
94 bool parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPr
opertyID second, bool important); | 94 bool parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPr
opertyID second, bool important); |
95 | 95 |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 void commitBorderImageProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValu
e>, bool important); | 360 void commitBorderImageProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValu
e>, bool important); |
361 | 361 |
362 private: | 362 private: |
363 // Inputs: | 363 // Inputs: |
364 CSSParserValueList* m_valueList; | 364 CSSParserValueList* m_valueList; |
365 const CSSParserContext& m_context; | 365 const CSSParserContext& m_context; |
366 const bool m_inViewport; | 366 const bool m_inViewport; |
367 | 367 |
368 // Outputs: | 368 // Outputs: |
369 WillBeHeapVector<CSSProperty, 256>& m_parsedProperties; | 369 WillBeHeapVector<CSSProperty, 256>& m_parsedProperties; |
370 CSSRuleSourceData::Type m_ruleType; | 370 StyleRule::Type m_ruleType; |
371 | 371 |
372 // Locals during parsing: | 372 // Locals during parsing: |
373 int m_inParseShorthand; | 373 int m_inParseShorthand; |
374 CSSPropertyID m_currentShorthand; | 374 CSSPropertyID m_currentShorthand; |
375 bool m_implicitShorthand; | 375 bool m_implicitShorthand; |
376 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation; | 376 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation; |
377 }; | 377 }; |
378 | 378 |
379 CSSPropertyID cssPropertyID(const CSSParserString&); | 379 CSSPropertyID cssPropertyID(const CSSParserString&); |
380 CSSPropertyID cssPropertyID(const String&); | 380 CSSPropertyID cssPropertyID(const String&); |
381 CSSValueID cssValueKeywordID(const CSSParserString&); | 381 CSSValueID cssValueKeywordID(const CSSParserString&); |
382 | 382 |
383 } // namespace blink | 383 } // namespace blink |
384 | 384 |
385 #endif // CSSPropertyParser_h | 385 #endif // CSSPropertyParser_h |
OLD | NEW |