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

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

Issue 2424943002: Add ReferrerPolicy support to preload (Closed)
Patch Set: Test fix Created 4 years, 1 month 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/fetch/CSSStyleSheetResource.h" 8 #include "core/fetch/CSSStyleSheetResource.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/frame/SubresourceIntegrity.h" 10 #include "core/frame/SubresourceIntegrity.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 return; 298 return;
299 if (!document().contentSecurityPolicy()->allowImageFromSource( 299 if (!document().contentSecurityPolicy()->allowImageFromSource(
300 builder.url())) 300 builder.url()))
301 return; 301 return;
302 if (document().frame() && document().frame()->loader().client()) { 302 if (document().frame() && document().frame()->loader().client()) {
303 document().frame()->loader().client()->dispatchDidChangeIcons( 303 document().frame()->loader().client()->dispatchDidChangeIcons(
304 m_owner->relAttribute().getIconType()); 304 m_owner->relAttribute().getIconType());
305 } 305 }
306 } 306 }
307 307
308 if (!m_owner->loadLink(type, as, media, builder.url())) 308 if (!m_owner->loadLink(type, as, media, m_owner->referrerPolicy(),
309 builder.url()))
309 return; 310 return;
310 311
311 if (m_disabledState != Disabled && m_owner->relAttribute().isStyleSheet() && 312 if (m_disabledState != Disabled && m_owner->relAttribute().isStyleSheet() &&
312 styleSheetTypeIsSupported(type) && shouldLoadResource() && 313 styleSheetTypeIsSupported(type) && shouldLoadResource() &&
313 builder.url().isValid()) { 314 builder.url().isValid()) {
314 if (resource()) { 315 if (resource()) {
315 removePendingSheet(); 316 removePendingSheet();
316 clearResource(); 317 clearResource();
317 clearFetchFollowingCORS(); 318 clearFetchFollowingCORS();
318 } 319 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 removePendingSheet(); 412 removePendingSheet();
412 } 413 }
413 414
414 DEFINE_TRACE(LinkStyle) { 415 DEFINE_TRACE(LinkStyle) {
415 visitor->trace(m_sheet); 416 visitor->trace(m_sheet);
416 LinkResource::trace(visitor); 417 LinkResource::trace(visitor);
417 ResourceOwner<StyleSheetResource>::trace(visitor); 418 ResourceOwner<StyleSheetResource>::trace(visitor);
418 } 419 }
419 420
420 } // namespace blink 421 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698