| 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/FrameHost.h" | 9 #include "core/frame/FrameHost.h" |
| 10 #include "core/frame/Settings.h" | 10 #include "core/frame/Settings.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 bool CSSParserContext::operator==(const CSSParserContext& other) const { | 120 bool CSSParserContext::operator==(const CSSParserContext& other) const { |
| 121 return m_baseURL == other.m_baseURL && m_charset == other.m_charset && | 121 return m_baseURL == other.m_baseURL && m_charset == other.m_charset && |
| 122 m_mode == other.m_mode && m_matchMode == other.m_matchMode && | 122 m_mode == other.m_mode && m_matchMode == other.m_matchMode && |
| 123 m_profile == other.m_profile && | 123 m_profile == other.m_profile && |
| 124 m_isHTMLDocument == other.m_isHTMLDocument && | 124 m_isHTMLDocument == other.m_isHTMLDocument && |
| 125 m_useLegacyBackgroundSizeShorthandBehavior == | 125 m_useLegacyBackgroundSizeShorthandBehavior == |
| 126 other.m_useLegacyBackgroundSizeShorthandBehavior; | 126 other.m_useLegacyBackgroundSizeShorthandBehavior; |
| 127 } | 127 } |
| 128 | 128 |
| 129 const CSSParserContext* strictCSSParserContext() { | 129 const CSSParserContext* strictCSSParserContext() { |
| 130 ALLOW_UNSAFE_SINGLETON() |
| 130 DEFINE_STATIC_LOCAL(CSSParserContext, strictContext, | 131 DEFINE_STATIC_LOCAL(CSSParserContext, strictContext, |
| 131 (CSSParserContext::create(HTMLStandardMode))); | 132 (CSSParserContext::create(HTMLStandardMode))); |
| 132 return &strictContext; | 133 return &strictContext; |
| 133 } | 134 } |
| 134 | 135 |
| 135 KURL CSSParserContext::completeURL(const String& url) const { | 136 KURL CSSParserContext::completeURL(const String& url) const { |
| 136 if (url.isNull()) | 137 if (url.isNull()) |
| 137 return KURL(); | 138 return KURL(); |
| 138 if (charset().isEmpty()) | 139 if (charset().isEmpty()) |
| 139 return KURL(baseURL(), url); | 140 return KURL(baseURL(), url); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 155 | 156 |
| 156 bool CSSParserContext::isDocumentHandleEqual(const Document* other) const { | 157 bool CSSParserContext::isDocumentHandleEqual(const Document* other) const { |
| 157 return m_document.get() == other; | 158 return m_document.get() == other; |
| 158 } | 159 } |
| 159 | 160 |
| 160 DEFINE_TRACE(CSSParserContext) { | 161 DEFINE_TRACE(CSSParserContext) { |
| 161 visitor->trace(m_document); | 162 visitor->trace(m_document); |
| 162 } | 163 } |
| 163 | 164 |
| 164 } // namespace blink | 165 } // namespace blink |
| OLD | NEW |