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

Side by Side Diff: Source/core/css/parser/CSSParserTokenRange.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/CSSParserToken.h ('k') | Source/core/css/parser/CSSParserValues.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 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 CSSParserTokenRange_h 5 #ifndef CSSParserTokenRange_h
6 #define CSSParserTokenRange_h 6 #define CSSParserTokenRange_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/css/parser/CSSParserToken.h" 9 #include "core/css/parser/CSSParserToken.h"
10 #include "wtf/Allocator.h"
10 #include "wtf/Vector.h" 11 #include "wtf/Vector.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 CORE_EXPORT extern const CSSParserToken& staticEOFToken; 15 CORE_EXPORT extern const CSSParserToken& staticEOFToken;
15 16
16 // A CSSParserTokenRange is an iterator over a subrange of a vector of CSSParser Tokens. 17 // A CSSParserTokenRange is an iterator over a subrange of a vector of CSSParser Tokens.
17 // Accessing outside of the range will return an endless stream of EOF tokens. 18 // Accessing outside of the range will return an endless stream of EOF tokens.
18 // This class refers to half-open intervals [first, last). 19 // This class refers to half-open intervals [first, last).
19 class CORE_EXPORT CSSParserTokenRange { 20 class CORE_EXPORT CSSParserTokenRange {
21 DISALLOW_ALLOCATION();
20 public: 22 public:
21 CSSParserTokenRange(const Vector<CSSParserToken>& vector) 23 CSSParserTokenRange(const Vector<CSSParserToken>& vector)
22 : m_first(vector.begin()) 24 : m_first(vector.begin())
23 , m_last(vector.end()) 25 , m_last(vector.end())
24 { 26 {
25 } 27 }
26 28
27 // This should be called on a range with tokens returned by that range. 29 // This should be called on a range with tokens returned by that range.
28 CSSParserTokenRange makeSubRange(const CSSParserToken* first, const CSSParse rToken* last) const; 30 CSSParserTokenRange makeSubRange(const CSSParserToken* first, const CSSParse rToken* last) const;
29 31
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 , m_last(last) 77 , m_last(last)
76 { } 78 { }
77 79
78 const CSSParserToken* m_first; 80 const CSSParserToken* m_first;
79 const CSSParserToken* m_last; 81 const CSSParserToken* m_last;
80 }; 82 };
81 83
82 } // namespace 84 } // namespace
83 85
84 #endif // CSSParserTokenRange_h 86 #endif // CSSParserTokenRange_h
OLDNEW
« no previous file with comments | « Source/core/css/parser/CSSParserToken.h ('k') | Source/core/css/parser/CSSParserValues.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698