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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSVariableData.h

Issue 1920583002: NOT FOR LANDING: Hack up CSSParser for speed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missing consts. Created 4 years, 8 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
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 CSSVariableData_h 5 #ifndef CSSVariableData_h
6 #define CSSVariableData_h 6 #define CSSVariableData_h
7 7
8 #include "core/css/StylePropertySet.h" 8 #include "core/css/StylePropertySet.h"
9 #include "core/css/parser/CSSParserToken.h" 9 #include "core/css/parser/CSSParserToken.h"
10 #include "core/css/parser/CSSParserTokenRange.h" 10 #include "core/css/parser/CSSParserTokenRange.h"
(...skipping 12 matching lines...) Expand all
23 static PassRefPtr<CSSVariableData> create(const CSSParserTokenRange& range, bool needsVariableResolution = true) 23 static PassRefPtr<CSSVariableData> create(const CSSParserTokenRange& range, bool needsVariableResolution = true)
24 { 24 {
25 return adoptRef(new CSSVariableData(range, needsVariableResolution)); 25 return adoptRef(new CSSVariableData(range, needsVariableResolution));
26 } 26 }
27 27
28 static PassRefPtr<CSSVariableData> createResolved(const Vector<CSSParserToke n>& resolvedTokens, const CSSVariableData& unresolvedData) 28 static PassRefPtr<CSSVariableData> createResolved(const Vector<CSSParserToke n>& resolvedTokens, const CSSVariableData& unresolvedData)
29 { 29 {
30 return adoptRef(new CSSVariableData(resolvedTokens, unresolvedData.m_bac kingString)); 30 return adoptRef(new CSSVariableData(resolvedTokens, unresolvedData.m_bac kingString));
31 } 31 }
32 32
33 CSSParserTokenRange tokenRange() { return m_tokens; } 33 const CSSParserTokenRange tokenRange() const { return CSSParserTokenRange(m_ tokens.begin(), m_tokens.end()); }
34 34
35 const Vector<CSSParserToken>& tokens() const { return m_tokens; } 35 const Vector<CSSParserToken>& tokens() const { return m_tokens; }
36 36
37 bool operator==(const CSSVariableData& other) const; 37 bool operator==(const CSSVariableData& other) const;
38 38
39 bool needsVariableResolution() const { return m_needsVariableResolution; } 39 bool needsVariableResolution() const { return m_needsVariableResolution; }
40 40
41 StylePropertySet* propertySet(); 41 StylePropertySet* propertySet();
42 42
43 private: 43 private:
(...skipping 18 matching lines...) Expand all
62 const bool m_needsVariableResolution; 62 const bool m_needsVariableResolution;
63 63
64 // Parsed representation for @apply 64 // Parsed representation for @apply
65 bool m_cachedPropertySet; 65 bool m_cachedPropertySet;
66 Persistent<StylePropertySet> m_propertySet; 66 Persistent<StylePropertySet> m_propertySet;
67 }; 67 };
68 68
69 } // namespace blink 69 } // namespace blink
70 70
71 #endif // CSSVariableData_h 71 #endif // CSSVariableData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698