| 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 #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/Settings.h" | 9 #include "core/frame/Settings.h" |
| 10 #include "core/frame/csp/ContentSecurityPolicy.h" | 10 #include "core/frame/csp/ContentSecurityPolicy.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 other->m_baseURL, other->m_charset, other->m_mode, other->m_matchMode, | 34 other->m_baseURL, other->m_charset, other->m_mode, other->m_matchMode, |
| 35 other->m_profile, other->m_referrer, other->m_isHTMLDocument, | 35 other->m_profile, other->m_referrer, other->m_isHTMLDocument, |
| 36 other->m_useLegacyBackgroundSizeShorthandBehavior, | 36 other->m_useLegacyBackgroundSizeShorthandBehavior, |
| 37 other->m_shouldCheckContentSecurityPolicy, useCounter); | 37 other->m_shouldCheckContentSecurityPolicy, useCounter); |
| 38 } | 38 } |
| 39 | 39 |
| 40 // static | 40 // static |
| 41 CSSParserContext* CSSParserContext::create(CSSParserMode mode, | 41 CSSParserContext* CSSParserContext::create(CSSParserMode mode, |
| 42 SelectorProfile profile, | 42 SelectorProfile profile, |
| 43 UseCounter* useCounter) { | 43 UseCounter* useCounter) { |
| 44 return new CSSParserContext(KURL(), emptyString(), mode, mode, profile, | 44 return new CSSParserContext(KURL(), emptyString, mode, mode, profile, |
| 45 Referrer(), false, false, | 45 Referrer(), false, false, |
| 46 DoNotCheckContentSecurityPolicy, useCounter); | 46 DoNotCheckContentSecurityPolicy, useCounter); |
| 47 } | 47 } |
| 48 | 48 |
| 49 // static | 49 // static |
| 50 CSSParserContext* CSSParserContext::create(const Document& document, | 50 CSSParserContext* CSSParserContext::create(const Document& document, |
| 51 UseCounter* useCounter) { | 51 UseCounter* useCounter) { |
| 52 return CSSParserContext::create(document, KURL(), emptyString(), | 52 return CSSParserContext::create(document, KURL(), emptyString, DynamicProfile, |
| 53 DynamicProfile, useCounter); | 53 useCounter); |
| 54 } | 54 } |
| 55 | 55 |
| 56 // static | 56 // static |
| 57 CSSParserContext* CSSParserContext::create(const Document& document, | 57 CSSParserContext* CSSParserContext::create(const Document& document, |
| 58 const KURL& baseURLOverride, | 58 const KURL& baseURLOverride, |
| 59 const String& charset, | 59 const String& charset, |
| 60 SelectorProfile profile, | 60 SelectorProfile profile, |
| 61 UseCounter* useCounter) { | 61 UseCounter* useCounter) { |
| 62 const KURL baseURL = | 62 const KURL baseURL = |
| 63 baseURLOverride.isNull() ? document.baseURL() : baseURLOverride; | 63 baseURLOverride.isNull() ? document.baseURL() : baseURLOverride; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 KURL CSSParserContext::completeURL(const String& url) const { | 133 KURL CSSParserContext::completeURL(const String& url) const { |
| 134 if (url.isNull()) | 134 if (url.isNull()) |
| 135 return KURL(); | 135 return KURL(); |
| 136 if (charset().isEmpty()) | 136 if (charset().isEmpty()) |
| 137 return KURL(baseURL(), url); | 137 return KURL(baseURL(), url); |
| 138 return KURL(baseURL(), url, charset()); | 138 return KURL(baseURL(), url, charset()); |
| 139 } | 139 } |
| 140 | 140 |
| 141 } // namespace blink | 141 } // namespace blink |
| OLD | NEW |