Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Side by Side Diff: Source/core/css/parser/CSSParserObserverWrapper.h

Issue 1304623002: Make blink classes and structures in core/css fast-allocated (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing (Fixed windows compile error) Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/css/parser/CSSParserFastPaths.h ('k') | Source/core/css/parser/CSSParserString.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "wtf/Allocator.h"
9 10
10 namespace blink { 11 namespace blink {
11 12
12 class CSSParserObserverWrapper { 13 class CSSParserObserverWrapper {
13 STACK_ALLOCATED(); 14 STACK_ALLOCATED();
14 public: 15 public:
15 explicit CSSParserObserverWrapper(CSSParserObserver& observer) 16 explicit CSSParserObserverWrapper(CSSParserObserver& observer)
16 : m_observer(observer) 17 : m_observer(observer)
17 { } 18 { }
18 19
(...skipping 16 matching lines...) Expand all
35 m_firstParserToken = firstParserToken; 36 m_firstParserToken = firstParserToken;
36 m_commentIterator = m_commentOffsets.begin(); 37 m_commentIterator = m_commentOffsets.begin();
37 } 38 }
38 39
39 private: 40 private:
40 CSSParserObserver& m_observer; 41 CSSParserObserver& m_observer;
41 Vector<unsigned> m_tokenOffsets; 42 Vector<unsigned> m_tokenOffsets;
42 CSSParserToken* m_firstParserToken; 43 CSSParserToken* m_firstParserToken;
43 44
44 struct CommentPosition { 45 struct CommentPosition {
46 ALLOW_ONLY_INLINE_ALLOCATION();
45 unsigned startOffset; 47 unsigned startOffset;
46 unsigned endOffset; 48 unsigned endOffset;
47 unsigned tokensBefore; 49 unsigned tokensBefore;
48 }; 50 };
49 51
50 Vector<CommentPosition> m_commentOffsets; 52 Vector<CommentPosition> m_commentOffsets;
51 Vector<CommentPosition>::iterator m_commentIterator; 53 Vector<CommentPosition>::iterator m_commentIterator;
52 }; 54 };
53 55
54 } // namespace blink 56 } // namespace blink
55 57
56 #endif // CSSParserObserverWrapper_h 58 #endif // CSSParserObserverWrapper_h
OLDNEW
« no previous file with comments | « Source/core/css/parser/CSSParserFastPaths.h ('k') | Source/core/css/parser/CSSParserString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698