OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CSSLazyPropertyParserImpl_h | 5 #ifndef CSSLazyPropertyParserImpl_h |
6 #define CSSLazyPropertyParserImpl_h | 6 #define CSSLazyPropertyParserImpl_h |
7 | 7 |
8 #include "core/css/StylePropertySet.h" | 8 #include "core/css/StylePropertySet.h" |
9 #include "core/css/parser/CSSParserTokenRange.h" | |
10 #include "core/css/parser/CSSTokenizer.h" | |
11 #include "wtf/Vector.h" | 9 #include "wtf/Vector.h" |
12 | 10 |
13 namespace blink { | 11 namespace blink { |
14 | 12 |
15 class CSSLazyParsingState; | 13 class CSSLazyParsingState; |
16 | 14 |
17 // This class is responsible for lazily parsing a single CSS declaration list. | 15 // This class is responsible for lazily parsing a single CSS declaration list. |
18 class CSSLazyPropertyParserImpl : public CSSLazyPropertyParser { | 16 class CSSLazyPropertyParserImpl : public CSSLazyPropertyParser { |
19 public: | 17 public: |
20 CSSLazyPropertyParserImpl(CSSParserTokenRange block, CSSLazyParsingState*); | 18 CSSLazyPropertyParserImpl(size_t startOffset, CSSLazyParsingState*); |
21 | 19 |
22 // CSSLazyPropertyParser: | 20 // CSSLazyPropertyParser: |
23 StylePropertySet* parseProperties() override; | 21 StylePropertySet* parseProperties() override; |
24 | 22 |
25 DEFINE_INLINE_TRACE() { | 23 DEFINE_INLINE_TRACE() { |
26 visitor->trace(m_lazyState); | 24 visitor->trace(m_lazyState); |
27 CSSLazyPropertyParser::trace(visitor); | 25 CSSLazyPropertyParser::trace(visitor); |
28 } | 26 } |
29 | 27 |
30 private: | 28 private: |
31 Vector<CSSParserToken> m_tokens; | 29 size_t m_startOffset; |
32 Member<CSSLazyParsingState> m_lazyState; | 30 Member<CSSLazyParsingState> m_lazyState; |
33 }; | 31 }; |
34 | 32 |
35 } // namespace blink | 33 } // namespace blink |
36 | 34 |
37 #endif // CSSLazyPropertyParserImpl_h | 35 #endif // CSSLazyPropertyParserImpl_h |
OLD | NEW |