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

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

Issue 1053953002: CSS Parser: Handle at-rules in declaration lists (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 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 CSSParserImpl_h 5 #ifndef CSSParserImpl_h
6 #define CSSParserImpl_h 6 #define CSSParserImpl_h
7 7
8 #include "core/CSSPropertyNames.h" 8 #include "core/CSSPropertyNames.h"
9 #include "core/css/CSSProperty.h" 9 #include "core/css/CSSProperty.h"
10 #include "core/css/CSSPropertySourceData.h" 10 #include "core/css/CSSPropertySourceData.h"
(...skipping 30 matching lines...) Expand all
41 enum AllowedRulesType { 41 enum AllowedRulesType {
42 // As per css-syntax, css-cascade and css-namespaces, @charset rules 42 // As per css-syntax, css-cascade and css-namespaces, @charset rules
43 // must come first, followed by @import then @namespace. 43 // must come first, followed by @import then @namespace.
44 // AllowImportRules actually means we allow @import and any rules thay 44 // AllowImportRules actually means we allow @import and any rules thay
45 // may follow it, i.e. @namespace rules and regular rules. 45 // may follow it, i.e. @namespace rules and regular rules.
46 // AllowCharsetRules and AllowNamespaceRules behave similarly. 46 // AllowCharsetRules and AllowNamespaceRules behave similarly.
47 AllowCharsetRules, 47 AllowCharsetRules,
48 AllowImportRules, 48 AllowImportRules,
49 AllowNamespaceRules, 49 AllowNamespaceRules,
50 RegularRules, 50 RegularRules,
51 KeyframeRules 51 KeyframeRules,
52 NoRules, // For parsing at-rules inside declaration lists
52 }; 53 };
53 54
54 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String &, bool important, const CSSParserContext&); 55 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String &, bool important, const CSSParserContext&);
55 static PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> parseInlineStyleDec laration(const String&, Element*); 56 static PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> parseInlineStyleDec laration(const String&, Element*);
56 static bool parseDeclarationList(MutableStylePropertySet*, const String&, co nst CSSParserContext&); 57 static bool parseDeclarationList(MutableStylePropertySet*, const String&, co nst CSSParserContext&);
57 static PassRefPtrWillBeRawPtr<StyleRuleBase> parseRule(const String&, const CSSParserContext&, AllowedRulesType); 58 static PassRefPtrWillBeRawPtr<StyleRuleBase> parseRule(const String&, const CSSParserContext&, AllowedRulesType);
58 static void parseStyleSheet(const String&, const CSSParserContext&, StyleShe etContents*); 59 static void parseStyleSheet(const String&, const CSSParserContext&, StyleShe etContents*);
59 60
60 static PassOwnPtr<Vector<double>> parseKeyframeKeyList(const String&); 61 static PassOwnPtr<Vector<double>> parseKeyframeKeyList(const String&);
61 62
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 WillBeHeapVector<CSSProperty, 256> m_parsedProperties; 101 WillBeHeapVector<CSSProperty, 256> m_parsedProperties;
101 CSSParserContext m_context; 102 CSSParserContext m_context;
102 103
103 AtomicString m_defaultNamespace; 104 AtomicString m_defaultNamespace;
104 RawPtrWillBeMember<StyleSheetContents> m_styleSheet; 105 RawPtrWillBeMember<StyleSheetContents> m_styleSheet;
105 }; 106 };
106 107
107 } // namespace blink 108 } // namespace blink
108 109
109 #endif // CSSParserImpl_h 110 #endif // CSSParserImpl_h
OLDNEW
« no previous file with comments | « LayoutTests/css-parser/at-rule-in-declaration-list.html ('k') | Source/core/css/parser/CSSParserImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698