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

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

Issue 2358203003: CSS Properties and Values API: Use initial value where appropriate for var() (Closed)
Patch Set: bla Created 4 years, 2 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CSSSyntaxDescriptor_h 5 #ifndef CSSSyntaxDescriptor_h
6 #define CSSSyntaxDescriptor_h 6 #define CSSSyntaxDescriptor_h
7 7
8 #include "core/css/parser/CSSParserTokenRange.h" 8 #include "core/css/parser/CSSParserTokenRange.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 29 matching lines...) Expand all
40 CSSSyntaxType m_type; 40 CSSSyntaxType m_type;
41 String m_string; // Only used when m_type is CSSSyntaxType::Ident 41 String m_string; // Only used when m_type is CSSSyntaxType::Ident
42 bool m_repeatable; 42 bool m_repeatable;
43 }; 43 };
44 44
45 class CSSSyntaxDescriptor { 45 class CSSSyntaxDescriptor {
46 public: 46 public:
47 CSSSyntaxDescriptor(String syntax); 47 CSSSyntaxDescriptor(String syntax);
48 48
49 const CSSValue* parse(CSSParserTokenRange) const; 49 const CSSValue* parse(CSSParserTokenRange) const;
50 const CSSValue* parse(const String&) const;
51 bool isValid() const { return !m_syntaxComponents.isEmpty(); } 50 bool isValid() const { return !m_syntaxComponents.isEmpty(); }
52 bool isTokenStream() const { return m_syntaxComponents.size() == 1 && m_synt axComponents[0].m_type == CSSSyntaxType::TokenStream; } 51 bool isTokenStream() const { return m_syntaxComponents.size() == 1 && m_synt axComponents[0].m_type == CSSSyntaxType::TokenStream; }
53 52
54 private: 53 private:
55 Vector<CSSSyntaxComponent> m_syntaxComponents; 54 Vector<CSSSyntaxComponent> m_syntaxComponents;
56 }; 55 };
57 56
58 } // namespace blink 57 } // namespace blink
59 58
60 #endif // CSSSyntaxDescriptor_h 59 #endif // CSSSyntaxDescriptor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698