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

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: Check for correct RuntimeEnabledFeatures to determine which features were installed. Created 4 years, 4 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 if (!visible) { 148 if (!visible) {
148 ASSERT(!linkStyle() || !linkStyle()->hasSheet()); 149 ASSERT(!linkStyle() || !linkStyle()->hasSheet());
149 return nullptr; 150 return nullptr;
150 } 151 }
151 152
152 if (!m_link) { 153 if (!m_link) {
153 if (m_relAttribute.isImport()) { 154 if (m_relAttribute.isImport()) {
154 m_link = LinkImport::create(this); 155 m_link = LinkImport::create(this);
155 } else if (m_relAttribute.isManifest()) { 156 } else if (m_relAttribute.isManifest()) {
156 m_link = LinkManifest::create(this); 157 m_link = LinkManifest::create(this);
157 } else if (RuntimeEnabledFeatures::linkServiceWorkerEnabled() && m_relAt tribute.isServiceWorker()) { 158 } else if (m_relAttribute.isServiceWorker() && OriginTrials::linkService WorkerEnabled(getExecutionContext())) {
158 if (document().frame()) 159 if (document().frame())
159 m_link = document().frame()->loader().client()->createServiceWor kerLinkResource(this); 160 m_link = document().frame()->loader().client()->createServiceWor kerLinkResource(this);
160 } else { 161 } else {
161 LinkStyle* link = LinkStyle::create(this); 162 LinkStyle* link = LinkStyle::create(this);
162 if (fastHasAttribute(disabledAttr)) { 163 if (fastHasAttribute(disabledAttr)) {
163 UseCounter::count(document(), UseCounter::HTMLLinkElementDisable d); 164 UseCounter::count(document(), UseCounter::HTMLLinkElementDisable d);
164 link->setDisabledState(true); 165 link->setDisabledState(true);
165 } 166 }
166 m_link = link; 167 m_link = link;
167 } 168 }
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 } 724 }
724 725
725 DEFINE_TRACE(LinkStyle) 726 DEFINE_TRACE(LinkStyle)
726 { 727 {
727 visitor->trace(m_sheet); 728 visitor->trace(m_sheet);
728 LinkResource::trace(visitor); 729 LinkResource::trace(visitor);
729 ResourceOwner<StyleSheetResource>::trace(visitor); 730 ResourceOwner<StyleSheetResource>::trace(visitor);
730 } 731 }
731 732
732 } // namespace blink 733 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698