| 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/html/LinkStyle.h" | 5 #include "core/html/LinkStyle.h" |
| 6 | 6 |
| 7 #include "core/css/StyleSheetContents.h" | 7 #include "core/css/StyleSheetContents.h" |
| 8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
| 9 #include "core/frame/LocalFrameClient.h" | 9 #include "core/frame/LocalFrameClient.h" |
| 10 #include "core/frame/SubresourceIntegrity.h" | 10 #include "core/frame/SubresourceIntegrity.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 if (disposition == ResourceIntegrityDisposition::Failed) { | 103 if (disposition == ResourceIntegrityDisposition::Failed) { |
| 104 m_loading = false; | 104 m_loading = false; |
| 105 removePendingSheet(); | 105 removePendingSheet(); |
| 106 notifyLoadedSheetAndAllCriticalSubresources( | 106 notifyLoadedSheetAndAllCriticalSubresources( |
| 107 Node::ErrorOccurredLoadingSubresource); | 107 Node::ErrorOccurredLoadingSubresource); |
| 108 return; | 108 return; |
| 109 } | 109 } |
| 110 } | 110 } |
| 111 | 111 |
| 112 CSSParserContext* parserContext = | 112 CSSParserContext* parserContext = CSSParserContext::create( |
| 113 CSSParserContext::create(m_owner->document(), baseURL, charset); | 113 m_owner->document(), baseURL, m_owner->document().getReferrerPolicy(), |
| 114 charset); |
| 114 | 115 |
| 115 DEFINE_STATIC_LOCAL(EnumerationHistogram, restoredCachedStyleSheetHistogram, | 116 DEFINE_STATIC_LOCAL(EnumerationHistogram, restoredCachedStyleSheetHistogram, |
| 116 ("Blink.RestoredCachedStyleSheet", 2)); | 117 ("Blink.RestoredCachedStyleSheet", 2)); |
| 117 DEFINE_STATIC_LOCAL( | 118 DEFINE_STATIC_LOCAL( |
| 118 EnumerationHistogram, restoredCachedStyleSheet2Histogram, | 119 EnumerationHistogram, restoredCachedStyleSheet2Histogram, |
| 119 ("Blink.RestoredCachedStyleSheet2", StyleSheetCacheStatusCount)); | 120 ("Blink.RestoredCachedStyleSheet2", StyleSheetCacheStatusCount)); |
| 120 | 121 |
| 121 if (StyleSheetContents* restoredSheet = | 122 if (StyleSheetContents* restoredSheet = |
| 122 const_cast<CSSStyleSheetResource*>(cachedStyleSheet) | 123 const_cast<CSSStyleSheetResource*>(cachedStyleSheet) |
| 123 ->restoreParsedStyleSheet(parserContext)) { | 124 ->restoreParsedStyleSheet(parserContext)) { |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 removePendingSheet(); | 418 removePendingSheet(); |
| 418 } | 419 } |
| 419 | 420 |
| 420 DEFINE_TRACE(LinkStyle) { | 421 DEFINE_TRACE(LinkStyle) { |
| 421 visitor->trace(m_sheet); | 422 visitor->trace(m_sheet); |
| 422 LinkResource::trace(visitor); | 423 LinkResource::trace(visitor); |
| 423 ResourceOwner<StyleSheetResource>::trace(visitor); | 424 ResourceOwner<StyleSheetResource>::trace(visitor); |
| 424 } | 425 } |
| 425 | 426 |
| 426 } // namespace blink | 427 } // namespace blink |
| OLD | NEW |