| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 m_type = value; | 186 m_type = value; |
| 187 process(); | 187 process(); |
| 188 } else if (name == asAttr) { | 188 } else if (name == asAttr) { |
| 189 m_as = value; | 189 m_as = value; |
| 190 process(); | 190 process(); |
| 191 } else if (name == sizesAttr) { | 191 } else if (name == sizesAttr) { |
| 192 m_sizes->setValue(value); | 192 m_sizes->setValue(value); |
| 193 } else if (name == mediaAttr) { | 193 } else if (name == mediaAttr) { |
| 194 m_media = value.lower(); | 194 m_media = value.lower(); |
| 195 process(); | 195 process(); |
| 196 } else if (name == scopeAttr) { |
| 197 m_scope = value; |
| 198 process(); |
| 196 } else if (name == disabledAttr) { | 199 } else if (name == disabledAttr) { |
| 197 UseCounter::count(document(), UseCounter::HTMLLinkElementDisabled); | 200 UseCounter::count(document(), UseCounter::HTMLLinkElementDisabled); |
| 198 if (LinkStyle* link = linkStyle()) | 201 if (LinkStyle* link = linkStyle()) |
| 199 link->setDisabledState(!value.isNull()); | 202 link->setDisabledState(!value.isNull()); |
| 200 } else { | 203 } else { |
| 201 if (name == titleAttr) { | 204 if (name == titleAttr) { |
| 202 if (LinkStyle* link = linkStyle()) | 205 if (LinkStyle* link = linkStyle()) |
| 203 link->setSheetTitle(value); | 206 link->setSheetTitle(value); |
| 204 } | 207 } |
| 205 | 208 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 223 if (!visible) { | 226 if (!visible) { |
| 224 ASSERT(!linkStyle() || !linkStyle()->hasSheet()); | 227 ASSERT(!linkStyle() || !linkStyle()->hasSheet()); |
| 225 return nullptr; | 228 return nullptr; |
| 226 } | 229 } |
| 227 | 230 |
| 228 if (!m_link) { | 231 if (!m_link) { |
| 229 if (m_relAttribute.isImport()) { | 232 if (m_relAttribute.isImport()) { |
| 230 m_link = LinkImport::create(this); | 233 m_link = LinkImport::create(this); |
| 231 } else if (m_relAttribute.isManifest()) { | 234 } else if (m_relAttribute.isManifest()) { |
| 232 m_link = LinkManifest::create(this); | 235 m_link = LinkManifest::create(this); |
| 236 } else if (RuntimeEnabledFeatures::linkServiceWorkerEnabled() && m_relAt
tribute.isServiceWorker()) { |
| 237 if (document().frame()) |
| 238 m_link = document().frame()->loader().client()->createServiceWor
kerLinkResource(this); |
| 233 } else { | 239 } else { |
| 234 OwnPtrWillBeRawPtr<LinkStyle> link = LinkStyle::create(this); | 240 OwnPtrWillBeRawPtr<LinkStyle> link = LinkStyle::create(this); |
| 235 if (fastHasAttribute(disabledAttr)) { | 241 if (fastHasAttribute(disabledAttr)) { |
| 236 UseCounter::count(document(), UseCounter::HTMLLinkElementDisable
d); | 242 UseCounter::count(document(), UseCounter::HTMLLinkElementDisable
d); |
| 237 link->setDisabledState(true); | 243 link->setDisabledState(true); |
| 238 } | 244 } |
| 239 m_link = link.release(); | 245 m_link = link.release(); |
| 240 } | 246 } |
| 241 } | 247 } |
| 242 | 248 |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 } | 793 } |
| 788 | 794 |
| 789 DEFINE_TRACE(LinkStyle) | 795 DEFINE_TRACE(LinkStyle) |
| 790 { | 796 { |
| 791 visitor->trace(m_sheet); | 797 visitor->trace(m_sheet); |
| 792 LinkResource::trace(visitor); | 798 LinkResource::trace(visitor); |
| 793 ResourceOwner<StyleSheetResource>::trace(visitor); | 799 ResourceOwner<StyleSheetResource>::trace(visitor); |
| 794 } | 800 } |
| 795 | 801 |
| 796 } // namespace blink | 802 } // namespace blink |
| OLD | NEW |