| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MediaQueryParser_h | 5 #ifndef MediaQueryParser_h |
| 6 #define MediaQueryParser_h | 6 #define MediaQueryParser_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/css/MediaList.h" | 9 #include "core/css/MediaList.h" |
| 10 #include "core/css/MediaQuery.h" | 10 #include "core/css/MediaQuery.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 } | 43 } |
| 44 inline MediaQuery::RestrictorType restrictor() { return m_restrictor; } | 44 inline MediaQuery::RestrictorType restrictor() { return m_restrictor; } |
| 45 | 45 |
| 46 inline void setRestrictor(MediaQuery::RestrictorType restrictor) { m_restric
tor = restrictor; } | 46 inline void setRestrictor(MediaQuery::RestrictorType restrictor) { m_restric
tor = restrictor; } |
| 47 | 47 |
| 48 inline void setMediaFeature(const String& str) { m_mediaFeature = str; } | 48 inline void setMediaFeature(const String& str) { m_mediaFeature = str; } |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 class CORE_EXPORT MediaQueryParser { | 51 class CORE_EXPORT MediaQueryParser { |
| 52 STACK_ALLOCATED(); | 52 STACK_ALLOCATED(); |
| 53 WTF_MAKE_NONCOPYABLE(MediaQueryParser); |
| 53 public: | 54 public: |
| 54 static MediaQuerySet* parseMediaQuerySet(const String&); | 55 static MediaQuerySet* parseMediaQuerySet(const String&); |
| 55 static MediaQuerySet* parseMediaQuerySet(CSSParserTokenRange); | 56 static MediaQuerySet* parseMediaQuerySet(CSSParserTokenRange); |
| 56 static MediaQuerySet* parseMediaCondition(CSSParserTokenRange); | 57 static MediaQuerySet* parseMediaCondition(CSSParserTokenRange); |
| 57 | 58 |
| 58 private: | 59 private: |
| 59 enum ParserType { | 60 enum ParserType { |
| 60 MediaQuerySetParser, | 61 MediaQuerySetParser, |
| 61 MediaConditionParser, | 62 MediaConditionParser, |
| 62 }; | 63 }; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 const static State ReadFeatureEnd; | 104 const static State ReadFeatureEnd; |
| 104 const static State SkipUntilComma; | 105 const static State SkipUntilComma; |
| 105 const static State SkipUntilBlockEnd; | 106 const static State SkipUntilBlockEnd; |
| 106 const static State Done; | 107 const static State Done; |
| 107 | 108 |
| 108 }; | 109 }; |
| 109 | 110 |
| 110 } // namespace blink | 111 } // namespace blink |
| 111 | 112 |
| 112 #endif // MediaQueryParser_h | 113 #endif // MediaQueryParser_h |
| OLD | NEW |