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

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

Issue 1139823009: Move recordSelectorStats out of CSSSelectorParser API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | Source/core/css/parser/CSSSelectorParser.cpp » ('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 CSSSelectorParser_h 5 #ifndef CSSSelectorParser_h
6 #define CSSSelectorParser_h 6 #define CSSSelectorParser_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/css/parser/CSSParserTokenRange.h" 9 #include "core/css/parser/CSSParserTokenRange.h"
10 #include "core/css/parser/CSSParserValues.h" 10 #include "core/css/parser/CSSParserValues.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class CSSSelectorList; 14 class CSSSelectorList;
15 class StyleSheetContents; 15 class StyleSheetContents;
16 16
17 // FIXME: We should consider building CSSSelectors directly instead of using 17 // FIXME: We should consider building CSSSelectors directly instead of using
18 // the intermediate CSSParserSelector. 18 // the intermediate CSSParserSelector.
19 class CORE_EXPORT CSSSelectorParser { 19 class CORE_EXPORT CSSSelectorParser {
20 public: 20 public:
21 static void parseSelector(CSSParserTokenRange, const CSSParserContext&, cons t AtomicString& defaultNamespace, StyleSheetContents*, CSSSelectorList&); 21 static void parseSelector(CSSParserTokenRange, const CSSParserContext&, cons t AtomicString& defaultNamespace, StyleSheetContents*, CSSSelectorList&);
22 22
23 static bool consumeANPlusB(CSSParserTokenRange&, std::pair<int, int>&); 23 static bool consumeANPlusB(CSSParserTokenRange&, std::pair<int, int>&);
24 24
25 // FIXME: This shouldn't be in the header once the Bison parser is removed
26 static void recordSelectorStats(const CSSParserContext&, const CSSSelectorLi st&);
27
28 private: 25 private:
29 CSSSelectorParser(const CSSParserContext&, const AtomicString& defaultNamesp ace, StyleSheetContents*); 26 CSSSelectorParser(const CSSParserContext&, const AtomicString& defaultNamesp ace, StyleSheetContents*);
30 27
31 // These will all consume trailing comments if successful 28 // These will all consume trailing comments if successful
32 29
33 void consumeComplexSelectorList(CSSParserTokenRange&, CSSSelectorList&); 30 void consumeComplexSelectorList(CSSParserTokenRange&, CSSSelectorList&);
34 void consumeCompoundSelectorList(CSSParserTokenRange&, CSSSelectorList&); 31 void consumeCompoundSelectorList(CSSParserTokenRange&, CSSSelectorList&);
35 32
36 PassOwnPtr<CSSParserSelector> consumeComplexSelector(CSSParserTokenRange&); 33 PassOwnPtr<CSSParserSelector> consumeComplexSelector(CSSParserTokenRange&);
37 PassOwnPtr<CSSParserSelector> consumeCompoundSelector(CSSParserTokenRange&); 34 PassOwnPtr<CSSParserSelector> consumeCompoundSelector(CSSParserTokenRange&);
(...skipping 21 matching lines...) Expand all
59 const CSSParserContext& m_context; 56 const CSSParserContext& m_context;
60 AtomicString m_defaultNamespace; 57 AtomicString m_defaultNamespace;
61 StyleSheetContents* m_styleSheet; // FIXME: Should be const 58 StyleSheetContents* m_styleSheet; // FIXME: Should be const
62 59
63 bool m_failedParsing; 60 bool m_failedParsing;
64 }; 61 };
65 62
66 } // namespace 63 } // namespace
67 64
68 #endif // CSSSelectorParser_h 65 #endif // CSSSelectorParser_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/parser/CSSSelectorParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698