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

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

Issue 2777433003: Remove base URL, referrer, and charset setters from CSSParserContext (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSParserContext.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "core/css/parser/CSSParserContext.h" 5 #include "core/css/parser/CSSParserContext.h"
6 6
7 #include "core/css/CSSStyleSheet.h" 7 #include "core/css/CSSStyleSheet.h"
8 #include "core/css/StyleSheetContents.h" 8 #include "core/css/StyleSheetContents.h"
9 #include "core/frame/Deprecation.h" 9 #include "core/frame/Deprecation.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 23 matching lines...) Expand all
34 CSSParserContext* CSSParserContext::create(const CSSParserContext* other, 34 CSSParserContext* CSSParserContext::create(const CSSParserContext* other,
35 const Document* useCounterDocument) { 35 const Document* useCounterDocument) {
36 return new CSSParserContext( 36 return new CSSParserContext(
37 other->m_baseURL, other->m_charset, other->m_mode, other->m_matchMode, 37 other->m_baseURL, other->m_charset, other->m_mode, other->m_matchMode,
38 other->m_profile, other->m_referrer, other->m_isHTMLDocument, 38 other->m_profile, other->m_referrer, other->m_isHTMLDocument,
39 other->m_useLegacyBackgroundSizeShorthandBehavior, 39 other->m_useLegacyBackgroundSizeShorthandBehavior,
40 other->m_shouldCheckContentSecurityPolicy, useCounterDocument); 40 other->m_shouldCheckContentSecurityPolicy, useCounterDocument);
41 } 41 }
42 42
43 // static 43 // static
44 CSSParserContext* CSSParserContext::create(const CSSParserContext* other,
45 const KURL& baseURL,
46 const String& charset,
47 const Referrer& referrer,
48 const Document* useCounterDocument) {
49 return new CSSParserContext(
50 baseURL, charset, other->m_mode, other->m_matchMode, other->m_profile,
51 referrer, other->m_isHTMLDocument,
52 other->m_useLegacyBackgroundSizeShorthandBehavior,
53 other->m_shouldCheckContentSecurityPolicy, useCounterDocument);
54 }
55
56 // static
44 CSSParserContext* CSSParserContext::create(CSSParserMode mode, 57 CSSParserContext* CSSParserContext::create(CSSParserMode mode,
45 SelectorProfile profile, 58 SelectorProfile profile,
46 const Document* useCounterDocument) { 59 const Document* useCounterDocument) {
47 return new CSSParserContext( 60 return new CSSParserContext(
48 KURL(), emptyString, mode, mode, profile, Referrer(), false, false, 61 KURL(), emptyString, mode, mode, profile, Referrer(), false, false,
49 DoNotCheckContentSecurityPolicy, useCounterDocument); 62 DoNotCheckContentSecurityPolicy, useCounterDocument);
50 } 63 }
51 64
52 // static 65 // static
53 CSSParserContext* CSSParserContext::create(const Document& document, 66 CSSParserContext* CSSParserContext::create(const Document& document,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 174
162 bool CSSParserContext::isDocumentHandleEqual(const Document* other) const { 175 bool CSSParserContext::isDocumentHandleEqual(const Document* other) const {
163 return m_document.get() == other; 176 return m_document.get() == other;
164 } 177 }
165 178
166 DEFINE_TRACE(CSSParserContext) { 179 DEFINE_TRACE(CSSParserContext) {
167 visitor->trace(m_document); 180 visitor->trace(m_document);
168 } 181 }
169 182
170 } // namespace blink 183 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSParserContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698