Index: third_party/WebKit/Source/core/css/parser/CSSParserContext.h |
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserContext.h b/third_party/WebKit/Source/core/css/parser/CSSParserContext.h |
index b96c3db467e536ec14bba21ebeb28bc3ddd68407..54072bc5037fd6c326d68d247abc0a7e24edcd33 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSParserContext.h |
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserContext.h |
@@ -16,28 +16,24 @@ namespace blink { |
class Document; |
class UseCounter; |
-class CORE_EXPORT CSSParserContext { |
- USING_FAST_MALLOC(CSSParserContext); |
- |
+class CORE_EXPORT CSSParserContext |
+ : public GarbageCollectedFinalized<CSSParserContext> { |
public: |
// https://drafts.csswg.org/selectors/#profiles |
enum SelectorProfile { DynamicProfile, StaticProfile }; |
- CSSParserContext(CSSParserMode, |
- UseCounter*, |
- SelectorProfile = DynamicProfile); |
+ CSSParserContext(CSSParserMode, SelectorProfile = DynamicProfile); |
// FIXME: We shouldn't need the UseCounter argument as we could infer it from |
// the Document but some callers want to disable use counting (e.g. the |
// WebInspector). |
CSSParserContext(const Document&, |
- UseCounter*, |
const KURL& baseURL = KURL(), |
const String& charset = emptyString(), |
SelectorProfile = DynamicProfile); |
// FIXME: This constructor shouldn't exist if we properly piped the UseCounter |
// through the CSS subsystem. Currently the UseCounter life time is too crazy |
// and we need a way to override it. |
- CSSParserContext(const CSSParserContext&, UseCounter*); |
+ CSSParserContext(const CSSParserContext*, UseCounter*); |
bool operator==(const CSSParserContext&) const; |
bool operator!=(const CSSParserContext& other) const { |
@@ -73,11 +69,15 @@ class CORE_EXPORT CSSParserContext { |
// This may return nullptr if counting is disabled. |
// See comments on constructors. |
UseCounter* useCounter() const { return m_useCounter; } |
+ bool isUseCounterRecordingEnabled() const { return m_useCounter; } |
+ void setUseCounter(UseCounter* useCounter) { m_useCounter = useCounter; } |
ContentSecurityPolicyDisposition shouldCheckContentSecurityPolicy() const { |
return m_shouldCheckContentSecurityPolicy; |
} |
+ DEFINE_INLINE_TRACE() {} |
+ |
private: |
KURL m_baseURL; |
String m_charset; |
@@ -92,8 +92,8 @@ class CORE_EXPORT CSSParserContext { |
UseCounter* m_useCounter; |
}; |
-CORE_EXPORT const CSSParserContext& strictCSSParserContext(); |
+CORE_EXPORT const CSSParserContext* strictCSSParserContext(); |
} // namespace blink |
-#endif // CSSParserMode_h |
+#endif // CSSParserContext_h |