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

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

Issue 2116503004: Make Foreign Fetch an origin trial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) 6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com)
7 * Copyright (C) 2011 Google Inc. All rights reserved. 7 * Copyright (C) 2011 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "core/frame/SubresourceIntegrity.h" 43 #include "core/frame/SubresourceIntegrity.h"
44 #include "core/frame/UseCounter.h" 44 #include "core/frame/UseCounter.h"
45 #include "core/frame/csp/ContentSecurityPolicy.h" 45 #include "core/frame/csp/ContentSecurityPolicy.h"
46 #include "core/html/CrossOriginAttribute.h" 46 #include "core/html/CrossOriginAttribute.h"
47 #include "core/html/LinkManifest.h" 47 #include "core/html/LinkManifest.h"
48 #include "core/html/imports/LinkImport.h" 48 #include "core/html/imports/LinkImport.h"
49 #include "core/inspector/ConsoleMessage.h" 49 #include "core/inspector/ConsoleMessage.h"
50 #include "core/loader/FrameLoader.h" 50 #include "core/loader/FrameLoader.h"
51 #include "core/loader/FrameLoaderClient.h" 51 #include "core/loader/FrameLoaderClient.h"
52 #include "core/loader/NetworkHintsInterface.h" 52 #include "core/loader/NetworkHintsInterface.h"
53 #include "core/origin_trials/OriginTrials.h"
53 #include "core/style/StyleInheritedData.h" 54 #include "core/style/StyleInheritedData.h"
54 #include "platform/ContentType.h" 55 #include "platform/ContentType.h"
55 #include "platform/Histogram.h" 56 #include "platform/Histogram.h"
56 #include "platform/MIMETypeRegistry.h" 57 #include "platform/MIMETypeRegistry.h"
57 #include "platform/RuntimeEnabledFeatures.h" 58 #include "platform/RuntimeEnabledFeatures.h"
58 #include "public/platform/WebIconSizesParser.h" 59 #include "public/platform/WebIconSizesParser.h"
59 #include "public/platform/WebSize.h" 60 #include "public/platform/WebSize.h"
60 #include "wtf/StdLibExtras.h" 61 #include "wtf/StdLibExtras.h"
61 62
62 namespace blink { 63 namespace blink {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 if (!visible) { 149 if (!visible) {
149 ASSERT(!linkStyle() || !linkStyle()->hasSheet()); 150 ASSERT(!linkStyle() || !linkStyle()->hasSheet());
150 return nullptr; 151 return nullptr;
151 } 152 }
152 153
153 if (!m_link) { 154 if (!m_link) {
154 if (m_relAttribute.isImport()) { 155 if (m_relAttribute.isImport()) {
155 m_link = LinkImport::create(this); 156 m_link = LinkImport::create(this);
156 } else if (m_relAttribute.isManifest()) { 157 } else if (m_relAttribute.isManifest()) {
157 m_link = LinkManifest::create(this); 158 m_link = LinkManifest::create(this);
158 } else if (RuntimeEnabledFeatures::linkServiceWorkerEnabled() && m_relAt tribute.isServiceWorker()) { 159 } else if (m_relAttribute.isServiceWorker() && OriginTrials::linkService WorkerEnabled(getExecutionContext())) {
159 if (document().frame()) 160 if (document().frame())
160 m_link = document().frame()->loader().client()->createServiceWor kerLinkResource(this); 161 m_link = document().frame()->loader().client()->createServiceWor kerLinkResource(this);
161 } else { 162 } else {
162 LinkStyle* link = LinkStyle::create(this); 163 LinkStyle* link = LinkStyle::create(this);
163 if (fastHasAttribute(disabledAttr)) { 164 if (fastHasAttribute(disabledAttr)) {
164 UseCounter::count(document(), UseCounter::HTMLLinkElementDisable d); 165 UseCounter::count(document(), UseCounter::HTMLLinkElementDisable d);
165 link->setDisabledState(true); 166 link->setDisabledState(true);
166 } 167 }
167 m_link = link; 168 m_link = link;
168 } 169 }
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 } 723 }
723 724
724 DEFINE_TRACE(LinkStyle) 725 DEFINE_TRACE(LinkStyle)
725 { 726 {
726 visitor->trace(m_sheet); 727 visitor->trace(m_sheet);
727 LinkResource::trace(visitor); 728 LinkResource::trace(visitor);
728 ResourceOwner<StyleSheetResource>::trace(visitor); 729 ResourceOwner<StyleSheetResource>::trace(visitor);
729 } 730 }
730 731
731 } // namespace blink 732 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698