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

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

Issue 2776163002: Change CSSParserContext to either take explicit or implicit referrer (Closed)
Patch Set: updates Created 3 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 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 21 matching lines...) Expand all
32 const CSSParserContext*, 32 const CSSParserContext*,
33 const StyleSheetContents*); 33 const StyleSheetContents*);
34 // FIXME: This constructor shouldn't exist if we properly piped the UseCounter 34 // FIXME: This constructor shouldn't exist if we properly piped the UseCounter
35 // through the CSS subsystem. Currently the UseCounter life time is too crazy 35 // through the CSS subsystem. Currently the UseCounter life time is too crazy
36 // and we need a way to override it. 36 // and we need a way to override it.
37 static CSSParserContext* create(const CSSParserContext* other, 37 static CSSParserContext* create(const CSSParserContext* other,
38 const Document* useCounterDocument); 38 const Document* useCounterDocument);
39 39
40 static CSSParserContext* create(const CSSParserContext* other, 40 static CSSParserContext* create(const CSSParserContext* other,
41 const KURL& baseURLOverride, 41 const KURL& baseURLOverride,
42 ReferrerPolicy referrerPolicyOverride,
42 const String& charsetOverride, 43 const String& charsetOverride,
43 const Referrer& referrerOverride,
44 const Document* useCounterDocument); 44 const Document* useCounterDocument);
45 45
46 static CSSParserContext* create(CSSParserMode, 46 static CSSParserContext* create(CSSParserMode,
47 SelectorProfile = DynamicProfile, 47 SelectorProfile = DynamicProfile,
48 const Document* useCounterDocument = nullptr); 48 const Document* useCounterDocument = nullptr);
49 static CSSParserContext* create(const Document&);
49 static CSSParserContext* create(const Document&, 50 static CSSParserContext* create(const Document&,
50 const Document* useCounterDocument); 51 const KURL& baseURLOverride,
51 static CSSParserContext* create(const Document&, 52 ReferrerPolicy referrerPolicyOverride,
52 const KURL& baseURLOverride = KURL(),
53 const String& charset = emptyString, 53 const String& charset = emptyString,
54 SelectorProfile = DynamicProfile, 54 SelectorProfile = DynamicProfile);
55 const Document* useCounterDocument = nullptr);
56 55
57 bool operator==(const CSSParserContext&) const; 56 bool operator==(const CSSParserContext&) const;
58 bool operator!=(const CSSParserContext& other) const { 57 bool operator!=(const CSSParserContext& other) const {
59 return !(*this == other); 58 return !(*this == other);
60 } 59 }
61 60
62 CSSParserMode mode() const { return m_mode; } 61 CSSParserMode mode() const { return m_mode; }
63 CSSParserMode matchMode() const { return m_matchMode; } 62 CSSParserMode matchMode() const { return m_matchMode; }
64 const KURL& baseURL() const { return m_baseURL; } 63 const KURL& baseURL() const { return m_baseURL; }
65 const String& charset() const { return m_charset; } 64 const String& charset() const { return m_charset; }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 ContentSecurityPolicyDisposition m_shouldCheckContentSecurityPolicy; 116 ContentSecurityPolicyDisposition m_shouldCheckContentSecurityPolicy;
118 117
119 WeakMember<const Document> m_document; 118 WeakMember<const Document> m_document;
120 }; 119 };
121 120
122 CORE_EXPORT const CSSParserContext* strictCSSParserContext(); 121 CORE_EXPORT const CSSParserContext* strictCSSParserContext();
123 122
124 } // namespace blink 123 } // namespace blink
125 124
126 #endif // CSSParserContext_h 125 #endif // CSSParserContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698