Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MediaQueryParser_h | |
| 6 #define MediaQueryParser_h | |
| 7 | |
| 8 #include "wtf/Vector.h" | |
| 9 #include "wtf/text/WTFString.h" | |
| 10 | |
| 11 namespace WebCore { | |
| 12 | |
| 13 class MediaQuery; | |
| 14 class MediaQuerySet; | |
| 15 class CSSToken; | |
| 16 | |
| 17 class MediaQueryParser { | |
| 18 public: | |
| 19 static PassRefPtr<MediaQuerySet> parse(String); | |
| 20 | |
| 21 private: | |
| 22 MediaQueryParser(String); | |
| 23 virtual ~MediaQueryParser() { }; | |
| 24 | |
| 25 PassRefPtr<MediaQuerySet> parseImpl(); | |
| 26 | |
| 27 enum State { | |
| 28 ReadRestrictor, | |
| 29 ReadMediaType, | |
| 30 ReadAnd, | |
| 31 ReadFeatureStart, | |
| 32 ReadFeature, | |
| 33 ReadFeatureColon, | |
| 34 ReadFeatureValue, | |
| 35 ReadFeatureEnd, | |
| 36 SkipTillComma, | |
| 37 SkipTillParen | |
| 38 }; | |
| 39 | |
| 40 State m_state; | |
| 41 Vector<CSSToken> m_tokens; | |
|
eseidel
2014/02/18 23:24:01
It turns out we already sort have a CSSToken in ou
| |
| 42 }; | |
| 43 | |
| 44 } // namespace WebCore | |
| 45 | |
| 46 #endif // MediaQueryParser_h | |
| OLD | NEW |