| OLD | NEW |
| 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 Loading... |
| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 if (!shouldLoadLink()) { | 147 if (!shouldLoadLink()) { |
| 147 ASSERT(!linkStyle() || !linkStyle()->hasSheet()); | 148 ASSERT(!linkStyle() || !linkStyle()->hasSheet()); |
| 148 return nullptr; | 149 return nullptr; |
| 149 } | 150 } |
| 150 | 151 |
| 151 if (!m_link) { | 152 if (!m_link) { |
| 152 if (m_relAttribute.isImport()) { | 153 if (m_relAttribute.isImport()) { |
| 153 m_link = LinkImport::create(this); | 154 m_link = LinkImport::create(this); |
| 154 } else if (m_relAttribute.isManifest()) { | 155 } else if (m_relAttribute.isManifest()) { |
| 155 m_link = LinkManifest::create(this); | 156 m_link = LinkManifest::create(this); |
| 156 } else if (RuntimeEnabledFeatures::linkServiceWorkerEnabled() && m_relAt
tribute.isServiceWorker()) { | 157 } else if (m_relAttribute.isServiceWorker() && OriginTrials::linkService
WorkerEnabled(getExecutionContext())) { |
| 157 if (document().frame()) | 158 if (document().frame()) |
| 158 m_link = document().frame()->loader().client()->createServiceWor
kerLinkResource(this); | 159 m_link = document().frame()->loader().client()->createServiceWor
kerLinkResource(this); |
| 159 } else { | 160 } else { |
| 160 LinkStyle* link = LinkStyle::create(this); | 161 LinkStyle* link = LinkStyle::create(this); |
| 161 if (fastHasAttribute(disabledAttr)) { | 162 if (fastHasAttribute(disabledAttr)) { |
| 162 UseCounter::count(document(), UseCounter::HTMLLinkElementDisable
d); | 163 UseCounter::count(document(), UseCounter::HTMLLinkElementDisable
d); |
| 163 link->setDisabledState(true); | 164 link->setDisabledState(true); |
| 164 } | 165 } |
| 165 m_link = link; | 166 m_link = link; |
| 166 } | 167 } |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |