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

Side by Side Diff: third_party/WebKit/Source/core/html/LinkStyle.cpp

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 #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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698