Chromium Code Reviews| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 | 77 |
| 78 bool styleSheetIsLoading() const; | 78 bool styleSheetIsLoading() const; |
| 79 bool hasSheet() const { return m_sheet; } | 79 bool hasSheet() const { return m_sheet; } |
| 80 bool isDisabled() const { return m_disabledState == Disabled; } | 80 bool isDisabled() const { return m_disabledState == Disabled; } |
| 81 bool isEnabledViaScript() const { return m_disabledState == EnabledViaScript ; } | 81 bool isEnabledViaScript() const { return m_disabledState == EnabledViaScript ; } |
| 82 bool isUnset() const { return m_disabledState == Unset; } | 82 bool isUnset() const { return m_disabledState == Unset; } |
| 83 | 83 |
| 84 CSSStyleSheet* sheet() const { return m_sheet.get(); } | 84 CSSStyleSheet* sheet() const { return m_sheet.get(); } |
| 85 | 85 |
| 86 private: | 86 private: |
| 87 // From ResourceClient | 87 // From StyleSheetResourceClient |
| 88 virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CSSStyleSheetResource*) OVERRIDE; | 88 virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CSSStyleSheetResource*) OVERRIDE; |
| 89 | 89 |
| 90 enum DisabledState { | 90 enum DisabledState { |
| 91 Unset, | 91 Unset, |
| 92 EnabledViaScript, | 92 EnabledViaScript, |
| 93 Disabled | 93 Disabled |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 enum PendingSheetType { | 96 enum PendingSheetType { |
| 97 None, | 97 None, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 149 | 149 |
| 150 void dispatchPendingEvent(LinkEventSender*); | 150 void dispatchPendingEvent(LinkEventSender*); |
| 151 void scheduleEvent(); | 151 void scheduleEvent(); |
| 152 void dispatchEventImmediately(); | 152 void dispatchEventImmediately(); |
| 153 static void dispatchPendingLoadEvents(); | 153 static void dispatchPendingLoadEvents(); |
| 154 | 154 |
| 155 // From LinkLoaderClient | 155 // From LinkLoaderClient |
| 156 virtual bool shouldLoadLink() OVERRIDE; | 156 virtual bool shouldLoadLink() OVERRIDE; |
| 157 | 157 |
| 158 // For LinkStyle | 158 // For LinkStyle |
| 159 bool loadLink(const String& type, const KURL& url) { return m_linkLoader.loa dLink(m_relAttribute, type, url, document()); } | 159 bool loadLink(const String&, const KURL&); |
|
abarth-chromium
2014/01/28 06:38:45
I'd probably keep the name |type| for the first ar
sof
2014/01/28 07:23:01
Yes, added 'type' back here + expanded LinkLoader:
| |
| 160 bool isAlternate() const { return linkStyle()->isUnset() && m_relAttribute.i sAlternate(); } | 160 bool isAlternate() const { return linkStyle()->isUnset() && m_relAttribute.i sAlternate(); } |
| 161 bool shouldProcessStyle() { return linkResourceToProcess() && linkStyle(); } | 161 bool shouldProcessStyle() { return linkResourceToProcess() && linkStyle(); } |
| 162 bool isCreatedByParser() const { return m_createdByParser; } | 162 bool isCreatedByParser() const { return m_createdByParser; } |
| 163 | 163 |
| 164 private: | 164 private: |
| 165 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; | 165 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; |
| 166 | 166 |
| 167 LinkStyle* linkStyle() const; | 167 LinkStyle* linkStyle() const; |
| 168 LinkImport* linkImport() const; | 168 LinkImport* linkImport() const; |
| 169 LinkResource* linkResourceToProcess(); | 169 LinkResource* linkResourceToProcess(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 DEFINE_NODE_TYPE_CASTS(HTMLLinkElement, hasTagName(HTMLNames::linkTag)); | 207 DEFINE_NODE_TYPE_CASTS(HTMLLinkElement, hasTagName(HTMLNames::linkTag)); |
| 208 | 208 |
| 209 } //namespace | 209 } //namespace |
| 210 | 210 |
| 211 #endif | 211 #endif |
| OLD | NEW |