OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CSSSupportsParser_h | 5 #ifndef CSSSupportsParser_h |
6 #define CSSSupportsParser_h | 6 #define CSSSupportsParser_h |
7 | 7 |
| 8 #include "platform/heap/Handle.h" |
| 9 |
8 namespace blink { | 10 namespace blink { |
9 | 11 |
10 class CSSParserImpl; | 12 class CSSParserImpl; |
11 class CSSParserTokenRange; | 13 class CSSParserTokenRange; |
12 | 14 |
13 class CSSSupportsParser { | 15 class CSSSupportsParser { |
| 16 STACK_ALLOCATED(); |
14 public: | 17 public: |
15 enum SupportsResult { | 18 enum SupportsResult { |
16 Unsupported = false, | 19 Unsupported = false, |
17 Supported = true, | 20 Supported = true, |
18 Invalid | 21 Invalid |
19 }; | 22 }; |
20 | 23 |
21 static SupportsResult supportsCondition(CSSParserTokenRange, CSSParserImpl&)
; | 24 static SupportsResult supportsCondition(CSSParserTokenRange, CSSParserImpl&)
; |
22 | 25 |
23 private: | 26 private: |
24 CSSSupportsParser(CSSParserImpl& parser) : m_parser(parser) { } | 27 CSSSupportsParser(CSSParserImpl& parser) : m_parser(parser) { } |
25 | 28 |
26 SupportsResult consumeCondition(CSSParserTokenRange); | 29 SupportsResult consumeCondition(CSSParserTokenRange); |
27 SupportsResult consumeNegation(CSSParserTokenRange); | 30 SupportsResult consumeNegation(CSSParserTokenRange); |
28 | 31 |
29 SupportsResult consumeConditionInParenthesis(CSSParserTokenRange&); | 32 SupportsResult consumeConditionInParenthesis(CSSParserTokenRange&); |
30 | 33 |
31 CSSParserImpl& m_parser; | 34 CSSParserImpl& m_parser; |
32 }; | 35 }; |
33 | 36 |
34 } // namespace blink | 37 } // namespace blink |
35 | 38 |
36 #endif // CSSSupportsParser_h | 39 #endif // CSSSupportsParser_h |
OLD | NEW |