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

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

Issue 2345543002: debugging for crbug.com/646539
Patch Set: 3 TUs, 2 .h Created 4 years, 3 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 /* 1 /*
2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
3 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above 9 * 1. Redistributions of source code must retain the above
10 * copyright notice, this list of conditions and the following 10 * copyright notice, this list of conditions and the following
(...skipping 14 matching lines...) Expand all
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
26 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 26 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
27 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE. 28 * SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef CSSParserMode_h 31 #ifndef CSSParserMode_h
32 #define CSSParserMode_h 32 #define CSSParserMode_h
33 33
34 #include "core/CoreExport.h" 34 #include "core/CoreExport.h"
35 #include "core/fetch/ResourceLoaderOptions.h" 35 //#include "core/fetch/ResourceLoaderOptions.h"
36 #include "platform/weborigin/KURL.h" 36 //#include "platform/weborigin/KURL.h"
37 #include "platform/weborigin/Referrer.h" 37 //#include "platform/weborigin/Referrer.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class Document; 41 class Document;
42 42
43 // Must not grow beyond 3 bits, due to packing in StylePropertySet. 43 // Must not grow beyond 3 bits, due to packing in StylePropertySet.
44 enum CSSParserMode { 44 enum CSSParserMode {
45 HTMLStandardMode, 45 HTMLStandardMode,
46 HTMLQuirksMode, 46 HTMLQuirksMode,
47 // HTML attributes are parsed in quirks mode but also allows internal proper ties and values. 47 // HTML attributes are parsed in quirks mode but also allows internal proper ties and values.
(...skipping 27 matching lines...) Expand all
75 return mode == CSSViewportRuleMode; 75 return mode == CSSViewportRuleMode;
76 } 76 }
77 77
78 inline bool isUseCounterEnabledForMode(CSSParserMode mode) 78 inline bool isUseCounterEnabledForMode(CSSParserMode mode)
79 { 79 {
80 // We don't count the UA style sheet in our statistics. 80 // We don't count the UA style sheet in our statistics.
81 return mode != UASheetMode; 81 return mode != UASheetMode;
82 } 82 }
83 83
84 class UseCounter; 84 class UseCounter;
85 #if 0
85 86
86 class CORE_EXPORT CSSParserContext { 87 class CORE_EXPORT CSSParserContext {
87 USING_FAST_MALLOC(CSSParserContext); 88 USING_FAST_MALLOC(CSSParserContext);
88 public: 89 public:
89 CSSParserContext(CSSParserMode, UseCounter*); 90 CSSParserContext(CSSParserMode, UseCounter*);
90 // FIXME: We shouldn't need the UseCounter argument as we could infer it fro m the Document 91 // FIXME: We shouldn't need the UseCounter argument as we could infer it fro m the Document
91 // but some callers want to disable use counting (e.g. the WebInspector). 92 // but some callers want to disable use counting (e.g. the WebInspector).
92 CSSParserContext(const Document&, UseCounter*, const KURL& baseURL = KURL(), const String& charset = emptyString()); 93 CSSParserContext(const Document&, UseCounter*, const KURL& baseURL = KURL(), const String& charset = emptyString());
93 // FIXME: This constructor shouldn't exist if we properly piped the UseCount er through the CSS 94 // FIXME: This constructor shouldn't exist if we properly piped the UseCount er through the CSS
94 // subsystem. Currently the UseCounter life time is too crazy and we need a way to override it. 95 // subsystem. Currently the UseCounter life time is too crazy and we need a way to override it.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 CSSParserMode m_matchMode; 132 CSSParserMode m_matchMode;
132 Referrer m_referrer; 133 Referrer m_referrer;
133 bool m_isHTMLDocument; 134 bool m_isHTMLDocument;
134 bool m_useLegacyBackgroundSizeShorthandBehavior; 135 bool m_useLegacyBackgroundSizeShorthandBehavior;
135 ContentSecurityPolicyDisposition m_shouldCheckContentSecurityPolicy; 136 ContentSecurityPolicyDisposition m_shouldCheckContentSecurityPolicy;
136 137
137 UseCounter* m_useCounter; 138 UseCounter* m_useCounter;
138 }; 139 };
139 140
140 CORE_EXPORT const CSSParserContext& strictCSSParserContext(); 141 CORE_EXPORT const CSSParserContext& strictCSSParserContext();
142 #endif
141 143
142 } // namespace blink 144 } // namespace blink
143 145
144 #endif // CSSParserMode_h 146 #endif // CSSParserMode_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleColor.h ('k') | third_party/WebKit/Source/core/layout/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698