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

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

Issue 2391923002: Call checkCompleted() synchronously in HTMLLinkElement::dispatchPendingEvent() (Closed)
Patch Set: Rebase Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLLinkElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 bool styleSheetIsLoading() const; 81 bool styleSheetIsLoading() const;
82 82
83 bool isImport() const { return linkImport(); } 83 bool isImport() const { return linkImport(); }
84 bool isDisabled() const { return linkStyle() && linkStyle()->isDisabled(); } 84 bool isDisabled() const { return linkStyle() && linkStyle()->isDisabled(); }
85 bool isEnabledViaScript() const { 85 bool isEnabledViaScript() const {
86 return linkStyle() && linkStyle()->isEnabledViaScript(); 86 return linkStyle() && linkStyle()->isEnabledViaScript();
87 } 87 }
88 88
89 DOMTokenList* sizes() const; 89 DOMTokenList* sizes() const;
90 90
91 void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>);
92 void scheduleEvent(); 91 void scheduleEvent();
93 92
94 // From LinkLoaderClient 93 // From LinkLoaderClient
95 bool shouldLoadLink() override; 94 bool shouldLoadLink() override;
96 95
97 // For LinkStyle 96 // For LinkStyle
98 bool loadLink(const String& type, 97 bool loadLink(const String& type,
99 const String& as, 98 const String& as,
100 const String& media, 99 const String& media,
101 ReferrerPolicy, 100 ReferrerPolicy,
(...skipping 11 matching lines...) Expand all
113 private: 112 private:
114 HTMLLinkElement(Document&, bool createdByParser); 113 HTMLLinkElement(Document&, bool createdByParser);
115 114
116 LinkStyle* linkStyle() const; 115 LinkStyle* linkStyle() const;
117 LinkImport* linkImport() const; 116 LinkImport* linkImport() const;
118 LinkResource* linkResourceToProcess(); 117 LinkResource* linkResourceToProcess();
119 118
120 void process(); 119 void process();
121 static void processCallback(Node*); 120 static void processCallback(Node*);
122 121
122 // Always call this asynchronously because this can cause synchronous
123 // Document load event and JavaScript execution.
124 void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>);
125
123 // From Node and subclassses 126 // From Node and subclassses
124 void parseAttribute(const AttributeModificationParams&) override; 127 void parseAttribute(const AttributeModificationParams&) override;
125 InsertionNotificationRequest insertedInto(ContainerNode*) override; 128 InsertionNotificationRequest insertedInto(ContainerNode*) override;
126 void removedFrom(ContainerNode*) override; 129 void removedFrom(ContainerNode*) override;
127 bool isURLAttribute(const Attribute&) const override; 130 bool isURLAttribute(const Attribute&) const override;
128 bool hasLegalLinkAttribute(const QualifiedName&) const override; 131 bool hasLegalLinkAttribute(const QualifiedName&) const override;
129 const QualifiedName& subResourceAttributeName() const override; 132 const QualifiedName& subResourceAttributeName() const override;
130 bool sheetLoaded() override; 133 bool sheetLoaded() override;
131 void notifyLoadedSheetAndAllCriticalSubresources( 134 void notifyLoadedSheetAndAllCriticalSubresources(
132 LoadedSheetErrorStatus) override; 135 LoadedSheetErrorStatus) override;
(...skipping 23 matching lines...) Expand all
156 TraceWrapperMember<RelList> m_relList; 159 TraceWrapperMember<RelList> m_relList;
157 LinkRelAttribute m_relAttribute; 160 LinkRelAttribute m_relAttribute;
158 String m_scope; 161 String m_scope;
159 162
160 bool m_createdByParser; 163 bool m_createdByParser;
161 }; 164 };
162 165
163 } // namespace blink 166 } // namespace blink
164 167
165 #endif // HTMLLinkElement_h 168 #endif // HTMLLinkElement_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLLinkElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698