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 CSSParserObserverWrapper_h | 5 #ifndef CSSParserObserverWrapper_h |
6 #define CSSParserObserverWrapper_h | 6 #define CSSParserObserverWrapper_h |
7 | 7 |
8 #include "core/css/parser/CSSParserObserver.h" | 8 #include "core/css/parser/CSSParserObserver.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 class CSSParserObserverWrapper { | 12 class CSSParserObserverWrapper { |
| 13 STACK_ALLOCATED(); |
13 public: | 14 public: |
14 CSSParserObserverWrapper(CSSParserObserver& observer) | 15 explicit CSSParserObserverWrapper(CSSParserObserver& observer) |
15 : m_observer(observer) | 16 : m_observer(observer) |
16 { } | 17 { } |
17 | 18 |
18 unsigned startOffset(const CSSParserTokenRange&); | 19 unsigned startOffset(const CSSParserTokenRange&); |
19 unsigned previousTokenStartOffset(const CSSParserTokenRange&); | 20 unsigned previousTokenStartOffset(const CSSParserTokenRange&); |
20 unsigned endOffset(const CSSParserTokenRange&); // Includes trailing comment
s | 21 unsigned endOffset(const CSSParserTokenRange&); // Includes trailing comment
s |
21 | 22 |
22 void skipCommentsBefore(const CSSParserTokenRange&, bool leaveDirectlyBefore
); | 23 void skipCommentsBefore(const CSSParserTokenRange&, bool leaveDirectlyBefore
); |
23 void yieldCommentsBefore(const CSSParserTokenRange&); | 24 void yieldCommentsBefore(const CSSParserTokenRange&); |
24 | 25 |
25 CSSParserObserver& observer() { return m_observer; } | 26 CSSParserObserver& observer() { return m_observer; } |
(...skipping 20 matching lines...) Expand all Loading... |
46 unsigned tokensBefore; | 47 unsigned tokensBefore; |
47 }; | 48 }; |
48 | 49 |
49 Vector<CommentPosition> m_commentOffsets; | 50 Vector<CommentPosition> m_commentOffsets; |
50 Vector<CommentPosition>::iterator m_commentIterator; | 51 Vector<CommentPosition>::iterator m_commentIterator; |
51 }; | 52 }; |
52 | 53 |
53 } // namespace blink | 54 } // namespace blink |
54 | 55 |
55 #endif // CSSParserObserverWrapper_h | 56 #endif // CSSParserObserverWrapper_h |
OLD | NEW |