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 25 matching lines...) Expand all Loading... |
36 #include "core/dom/Document.h" | 36 #include "core/dom/Document.h" |
37 #include "core/events/Event.h" | 37 #include "core/events/Event.h" |
38 #include "core/events/EventSender.h" | 38 #include "core/events/EventSender.h" |
39 #include "core/dom/StyleEngine.h" | 39 #include "core/dom/StyleEngine.h" |
40 #include "core/fetch/CSSStyleSheetResource.h" | 40 #include "core/fetch/CSSStyleSheetResource.h" |
41 #include "core/fetch/FetchRequest.h" | 41 #include "core/fetch/FetchRequest.h" |
42 #include "core/fetch/ResourceFetcher.h" | 42 #include "core/fetch/ResourceFetcher.h" |
43 #include "core/frame/FrameView.h" | 43 #include "core/frame/FrameView.h" |
44 #include "core/frame/LocalFrame.h" | 44 #include "core/frame/LocalFrame.h" |
45 #include "core/frame/csp/ContentSecurityPolicy.h" | 45 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 46 #include "core/html/LinkManifest.h" |
46 #include "core/html/imports/LinkImport.h" | 47 #include "core/html/imports/LinkImport.h" |
47 #include "core/loader/FrameLoader.h" | 48 #include "core/loader/FrameLoader.h" |
48 #include "core/loader/FrameLoaderClient.h" | 49 #include "core/loader/FrameLoaderClient.h" |
49 #include "wtf/StdLibExtras.h" | 50 #include "wtf/StdLibExtras.h" |
50 | 51 |
51 namespace WebCore { | 52 namespace WebCore { |
52 | 53 |
53 using namespace HTMLNames; | 54 using namespace HTMLNames; |
54 | 55 |
55 template <typename CharacterType> | 56 template <typename CharacterType> |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 | 200 |
200 LinkResource* HTMLLinkElement::linkResourceToProcess() | 201 LinkResource* HTMLLinkElement::linkResourceToProcess() |
201 { | 202 { |
202 bool visible = inDocument() && !m_isInShadowTree; | 203 bool visible = inDocument() && !m_isInShadowTree; |
203 if (!visible) { | 204 if (!visible) { |
204 ASSERT(!linkStyle() || !linkStyle()->hasSheet()); | 205 ASSERT(!linkStyle() || !linkStyle()->hasSheet()); |
205 return 0; | 206 return 0; |
206 } | 207 } |
207 | 208 |
208 if (!m_link) { | 209 if (!m_link) { |
209 if (m_relAttribute.isImport() && RuntimeEnabledFeatures::htmlImportsEnab
led()) | 210 if (m_relAttribute.isImport() && RuntimeEnabledFeatures::htmlImportsEnab
led()) { |
210 m_link = LinkImport::create(this); | 211 m_link = LinkImport::create(this); |
211 else { | 212 } else if (m_relAttribute.isManifest() && RuntimeEnabledFeatures::manife
stEnabled()) { |
| 213 m_link = LinkManifest::create(this); |
| 214 } else { |
212 OwnPtr<LinkStyle> link = LinkStyle::create(this); | 215 OwnPtr<LinkStyle> link = LinkStyle::create(this); |
213 if (fastHasAttribute(disabledAttr)) | 216 if (fastHasAttribute(disabledAttr)) |
214 link->setDisabledState(true); | 217 link->setDisabledState(true); |
215 m_link = link.release(); | 218 m_link = link.release(); |
216 } | 219 } |
217 } | 220 } |
218 | 221 |
219 return m_link.get(); | 222 return m_link.get(); |
220 } | 223 } |
221 | 224 |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 void LinkStyle::ownerRemoved() | 689 void LinkStyle::ownerRemoved() |
687 { | 690 { |
688 if (m_sheet) | 691 if (m_sheet) |
689 clearSheet(); | 692 clearSheet(); |
690 | 693 |
691 if (styleSheetIsLoading()) | 694 if (styleSheetIsLoading()) |
692 removePendingSheet(RemovePendingSheetNotifyLater); | 695 removePendingSheet(RemovePendingSheetNotifyLater); |
693 } | 696 } |
694 | 697 |
695 } // namespace WebCore | 698 } // namespace WebCore |
OLD | NEW |