Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 CSSParserContext_h | 5 #ifndef CSSParserContext_h |
| 6 #define CSSParserContext_h | 6 #define CSSParserContext_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/css/parser/CSSParserMode.h" | 9 #include "core/css/parser/CSSParserMode.h" |
| 10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 return use_legacy_background_size_shorthand_behavior_; | 75 return use_legacy_background_size_shorthand_behavior_; |
| 76 } | 76 } |
| 77 | 77 |
| 78 // FIXME: This setter shouldn't exist, however the current lifetime of | 78 // FIXME: This setter shouldn't exist, however the current lifetime of |
| 79 // CSSParserContext is not well understood and thus we sometimes need to | 79 // CSSParserContext is not well understood and thus we sometimes need to |
| 80 // override this field. | 80 // override this field. |
| 81 void SetMode(CSSParserMode mode) { mode_ = mode; } | 81 void SetMode(CSSParserMode mode) { mode_ = mode; } |
| 82 | 82 |
| 83 KURL CompleteURL(const String& url) const; | 83 KURL CompleteURL(const String& url) const; |
| 84 | 84 |
| 85 // TODO(lunalu): Deprecate UseCounter::Feature by WebFeature in Count() and | |
| 86 // CounterDeprecation(). | |
| 85 void Count(UseCounter::Feature) const; | 87 void Count(UseCounter::Feature) const; |
| 88 void Count(WebFeature feature) const { | |
| 89 return Count(static_cast<UseCounter::Feature>(feature)); | |
|
Rick Byers
2017/05/23 19:51:49
I think this would be slightly cleaner if you inve
lunalu1
2017/05/24 20:56:32
Right. Reverted.
| |
| 90 } | |
| 86 void Count(CSSParserMode, CSSPropertyID) const; | 91 void Count(CSSParserMode, CSSPropertyID) const; |
| 87 void CountDeprecation(UseCounter::Feature) const; | 92 void CountDeprecation(UseCounter::Feature) const; |
| 93 void CountDeprecation(WebFeature feature) const { | |
| 94 return CountDeprecation(static_cast<UseCounter::Feature>(feature)); | |
| 95 } | |
| 88 bool IsUseCounterRecordingEnabled() const { return document_; } | 96 bool IsUseCounterRecordingEnabled() const { return document_; } |
| 89 bool IsDocumentHandleEqual(const Document* other) const; | 97 bool IsDocumentHandleEqual(const Document* other) const; |
| 90 | 98 |
| 91 ContentSecurityPolicyDisposition ShouldCheckContentSecurityPolicy() const { | 99 ContentSecurityPolicyDisposition ShouldCheckContentSecurityPolicy() const { |
| 92 return should_check_content_security_policy_; | 100 return should_check_content_security_policy_; |
| 93 } | 101 } |
| 94 | 102 |
| 95 DECLARE_TRACE(); | 103 DECLARE_TRACE(); |
| 96 | 104 |
| 97 private: | 105 private: |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 117 ContentSecurityPolicyDisposition should_check_content_security_policy_; | 125 ContentSecurityPolicyDisposition should_check_content_security_policy_; |
| 118 | 126 |
| 119 WeakMember<const Document> document_; | 127 WeakMember<const Document> document_; |
| 120 }; | 128 }; |
| 121 | 129 |
| 122 CORE_EXPORT const CSSParserContext* StrictCSSParserContext(); | 130 CORE_EXPORT const CSSParserContext* StrictCSSParserContext(); |
| 123 | 131 |
| 124 } // namespace blink | 132 } // namespace blink |
| 125 | 133 |
| 126 #endif // CSSParserContext_h | 134 #endif // CSSParserContext_h |
| OLD | NEW |