| 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 * Copyright (C) 2003, 2008, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2008, 2010 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2011 Google Inc. All rights reserved. | 5 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 DisabledState m_disabledState; | 113 DisabledState m_disabledState; |
| 114 PendingSheetType m_pendingSheetType; | 114 PendingSheetType m_pendingSheetType; |
| 115 bool m_loading; | 115 bool m_loading; |
| 116 bool m_firedLoad; | 116 bool m_firedLoad; |
| 117 bool m_loadedSheet; | 117 bool m_loadedSheet; |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 | 120 |
| 121 class HTMLLinkElement FINAL : public HTMLElement, public LinkLoaderClient { | 121 class HTMLLinkElement FINAL : public HTMLElement, public LinkLoaderClient { |
| 122 public: | 122 public: |
| 123 static PassRefPtr<HTMLLinkElement> create(const QualifiedName&, Document*, b
ool createdByParser); | 123 static PassRefPtr<HTMLLinkElement> create(const QualifiedName&, Document&, b
ool createdByParser); |
| 124 virtual ~HTMLLinkElement(); | 124 virtual ~HTMLLinkElement(); |
| 125 | 125 |
| 126 KURL href() const; | 126 KURL href() const; |
| 127 String rel() const; | 127 String rel() const; |
| 128 String media() const { return m_media; } | 128 String media() const { return m_media; } |
| 129 String typeValue() const { return m_type; } | 129 String typeValue() const { return m_type; } |
| 130 const LinkRelAttribute& relAttribute() const { return m_relAttribute; } | 130 const LinkRelAttribute& relAttribute() const { return m_relAttribute; } |
| 131 | 131 |
| 132 virtual String target() const; | 132 virtual String target() const; |
| 133 | 133 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 // From LinkLoaderClient | 183 // From LinkLoaderClient |
| 184 virtual void linkLoaded() OVERRIDE; | 184 virtual void linkLoaded() OVERRIDE; |
| 185 virtual void linkLoadingErrored() OVERRIDE; | 185 virtual void linkLoadingErrored() OVERRIDE; |
| 186 virtual void didStartLinkPrerender() OVERRIDE; | 186 virtual void didStartLinkPrerender() OVERRIDE; |
| 187 virtual void didStopLinkPrerender() OVERRIDE; | 187 virtual void didStopLinkPrerender() OVERRIDE; |
| 188 virtual void didSendLoadForLinkPrerender() OVERRIDE; | 188 virtual void didSendLoadForLinkPrerender() OVERRIDE; |
| 189 virtual void didSendDOMContentLoadedForLinkPrerender() OVERRIDE; | 189 virtual void didSendDOMContentLoadedForLinkPrerender() OVERRIDE; |
| 190 | 190 |
| 191 private: | 191 private: |
| 192 HTMLLinkElement(const QualifiedName&, Document*, bool createdByParser); | 192 HTMLLinkElement(const QualifiedName&, Document&, bool createdByParser); |
| 193 | 193 |
| 194 RefPtr<LinkResource> m_link; | 194 RefPtr<LinkResource> m_link; |
| 195 LinkLoader m_linkLoader; | 195 LinkLoader m_linkLoader; |
| 196 | 196 |
| 197 String m_type; | 197 String m_type; |
| 198 String m_media; | 198 String m_media; |
| 199 RefPtr<DOMSettableTokenList> m_sizes; | 199 RefPtr<DOMSettableTokenList> m_sizes; |
| 200 LinkRelAttribute m_relAttribute; | 200 LinkRelAttribute m_relAttribute; |
| 201 | 201 |
| 202 bool m_createdByParser; | 202 bool m_createdByParser; |
| 203 bool m_isInShadowTree; | 203 bool m_isInShadowTree; |
| 204 int m_beforeLoadRecurseCount; | 204 int m_beforeLoadRecurseCount; |
| 205 }; | 205 }; |
| 206 | 206 |
| 207 inline HTMLLinkElement* toHTMLLinkElement(Node* node) | 207 inline HTMLLinkElement* toHTMLLinkElement(Node* node) |
| 208 { | 208 { |
| 209 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::linkTa
g)); | 209 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::linkTa
g)); |
| 210 return static_cast<HTMLLinkElement*>(node); | 210 return static_cast<HTMLLinkElement*>(node); |
| 211 } | 211 } |
| 212 | 212 |
| 213 } //namespace | 213 } //namespace |
| 214 | 214 |
| 215 #endif | 215 #endif |
| OLD | NEW |