Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLLinkElement.h

Issue 1629403003: Merge DOMSettableTokensList into DOMTokensList (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed non-oilpan inheritance Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.
11 * 11 *
12 * This library is distributed in the hope that it will be useful, 12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details. 15 * Library General Public License for more details.
16 * 16 *
17 * You should have received a copy of the GNU Library General Public License 17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to 18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA. 20 * Boston, MA 02110-1301, USA.
21 * 21 *
22 */ 22 */
23 23
24 #ifndef HTMLLinkElement_h 24 #ifndef HTMLLinkElement_h
25 #define HTMLLinkElement_h 25 #define HTMLLinkElement_h
26 26
27 #include "core/CoreExport.h" 27 #include "core/CoreExport.h"
28 #include "core/css/CSSStyleSheet.h" 28 #include "core/css/CSSStyleSheet.h"
29 #include "core/dom/DOMSettableTokenList.h" 29 #include "core/dom/DOMTokenList.h"
30 #include "core/dom/IconURL.h" 30 #include "core/dom/IconURL.h"
31 #include "core/fetch/ResourceOwner.h" 31 #include "core/fetch/ResourceOwner.h"
32 #include "core/fetch/StyleSheetResource.h" 32 #include "core/fetch/StyleSheetResource.h"
33 #include "core/fetch/StyleSheetResourceClient.h" 33 #include "core/fetch/StyleSheetResourceClient.h"
34 #include "core/html/HTMLElement.h" 34 #include "core/html/HTMLElement.h"
35 #include "core/html/LinkRelAttribute.h" 35 #include "core/html/LinkRelAttribute.h"
36 #include "core/html/LinkResource.h" 36 #include "core/html/LinkResource.h"
37 #include "core/html/RelList.h" 37 #include "core/html/RelList.h"
38 #include "core/loader/LinkLoader.h" 38 #include "core/loader/LinkLoader.h"
39 #include "core/loader/LinkLoaderClient.h" 39 #include "core/loader/LinkLoaderClient.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 RefPtrWillBeMember<CSSStyleSheet> m_sheet; 122 RefPtrWillBeMember<CSSStyleSheet> m_sheet;
123 DisabledState m_disabledState; 123 DisabledState m_disabledState;
124 PendingSheetType m_pendingSheetType; 124 PendingSheetType m_pendingSheetType;
125 bool m_loading; 125 bool m_loading;
126 bool m_firedLoad; 126 bool m_firedLoad;
127 bool m_loadedSheet; 127 bool m_loadedSheet;
128 bool m_fetchFollowingCORS; 128 bool m_fetchFollowingCORS;
129 }; 129 };
130 130
131 131
132 class CORE_EXPORT HTMLLinkElement final : public HTMLElement, public LinkLoaderC lient, private DOMSettableTokenListObserver { 132 class CORE_EXPORT HTMLLinkElement final : public HTMLElement, public LinkLoaderC lient, private DOMTokenListObserver {
133 DEFINE_WRAPPERTYPEINFO(); 133 DEFINE_WRAPPERTYPEINFO();
134 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLLinkElement); 134 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLLinkElement);
135 public: 135 public:
136 static PassRefPtrWillBeRawPtr<HTMLLinkElement> create(Document&, bool create dByParser); 136 static PassRefPtrWillBeRawPtr<HTMLLinkElement> create(Document&, bool create dByParser);
137 ~HTMLLinkElement() override; 137 ~HTMLLinkElement() override;
138 138
139 KURL href() const; 139 KURL href() const;
140 const AtomicString& rel() const; 140 const AtomicString& rel() const;
141 String media() const { return m_media; } 141 String media() const { return m_media; }
142 String typeValue() const { return m_type; } 142 String typeValue() const { return m_type; }
(...skipping 12 matching lines...) Expand all
155 155
156 CSSStyleSheet* sheet() const { return linkStyle() ? linkStyle()->sheet() : 0 ; } 156 CSSStyleSheet* sheet() const { return linkStyle() ? linkStyle()->sheet() : 0 ; }
157 Document* import() const; 157 Document* import() const;
158 158
159 bool styleSheetIsLoading() const; 159 bool styleSheetIsLoading() const;
160 160
161 bool isImport() const { return linkImport(); } 161 bool isImport() const { return linkImport(); }
162 bool isDisabled() const { return linkStyle() && linkStyle()->isDisabled(); } 162 bool isDisabled() const { return linkStyle() && linkStyle()->isDisabled(); }
163 bool isEnabledViaScript() const { return linkStyle() && linkStyle()->isEnabl edViaScript(); } 163 bool isEnabledViaScript() const { return linkStyle() && linkStyle()->isEnabl edViaScript(); }
164 164
165 DOMSettableTokenList* sizes() const; 165 DOMTokenList* sizes() const;
166 166
167 void dispatchPendingEvent(LinkEventSender*); 167 void dispatchPendingEvent(LinkEventSender*);
168 void scheduleEvent(); 168 void scheduleEvent();
169 void dispatchEventImmediately(); 169 void dispatchEventImmediately();
170 static void dispatchPendingLoadEvents(); 170 static void dispatchPendingLoadEvents();
171 171
172 // From LinkLoaderClient 172 // From LinkLoaderClient
173 bool shouldLoadLink() override; 173 bool shouldLoadLink() override;
174 174
175 // For LinkStyle 175 // For LinkStyle
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 void finishParsingChildren() override; 207 void finishParsingChildren() override;
208 208
209 // From LinkLoaderClient 209 // From LinkLoaderClient
210 void linkLoaded() override; 210 void linkLoaded() override;
211 void linkLoadingErrored() override; 211 void linkLoadingErrored() override;
212 void didStartLinkPrerender() override; 212 void didStartLinkPrerender() override;
213 void didStopLinkPrerender() override; 213 void didStopLinkPrerender() override;
214 void didSendLoadForLinkPrerender() override; 214 void didSendLoadForLinkPrerender() override;
215 void didSendDOMContentLoadedForLinkPrerender() override; 215 void didSendDOMContentLoadedForLinkPrerender() override;
216 216
217 // From DOMSettableTokenListObserver 217 // From DOMTokenListObserver
218 void valueWasSet() final; 218 void valueWasSet() final;
219 219
220 OwnPtrWillBeMember<LinkResource> m_link; 220 OwnPtrWillBeMember<LinkResource> m_link;
221 OwnPtrWillBeMember<LinkLoader> m_linkLoader; 221 OwnPtrWillBeMember<LinkLoader> m_linkLoader;
222 222
223 String m_type; 223 String m_type;
224 String m_as; 224 String m_as;
225 String m_media; 225 String m_media;
226 RefPtrWillBeMember<DOMSettableTokenList> m_sizes; 226 RefPtrWillBeMember<DOMTokenList> m_sizes;
227 Vector<IntSize> m_iconSizes; 227 Vector<IntSize> m_iconSizes;
228 OwnPtrWillBeMember<RelList> m_relList; 228 RefPtrWillBeMember<RelList> m_relList;
229 LinkRelAttribute m_relAttribute; 229 LinkRelAttribute m_relAttribute;
230 230
231 bool m_createdByParser; 231 bool m_createdByParser;
232 bool m_isInShadowTree; 232 bool m_isInShadowTree;
233 }; 233 };
234 234
235 } // namespace blink 235 } // namespace blink
236 236
237 #endif // HTMLLinkElement_h 237 #endif // HTMLLinkElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698