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

Side by Side Diff: third_party/WebKit/Source/core/html/imports/HTMLImportChild.cpp

Issue 1914923002: Rename all existing custom element classes as V0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CustomElementV0 -> V0CustomElement Created 4 years, 7 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "core/html/imports/HTMLImportChild.h" 31 #include "core/html/imports/HTMLImportChild.h"
32 32
33 #include "core/css/StyleSheetList.h" 33 #include "core/css/StyleSheetList.h"
34 #include "core/dom/Document.h" 34 #include "core/dom/Document.h"
35 #include "core/dom/StyleEngine.h" 35 #include "core/dom/StyleEngine.h"
36 #include "core/dom/custom/CustomElement.h" 36 #include "core/dom/custom/V0CustomElement.h"
37 #include "core/dom/custom/CustomElementMicrotaskImportStep.h" 37 #include "core/dom/custom/V0CustomElementMicrotaskImportStep.h"
38 #include "core/dom/custom/CustomElementSyncMicrotaskQueue.h" 38 #include "core/dom/custom/V0CustomElementSyncMicrotaskQueue.h"
39 #include "core/frame/UseCounter.h" 39 #include "core/frame/UseCounter.h"
40 #include "core/html/imports/HTMLImportChildClient.h" 40 #include "core/html/imports/HTMLImportChildClient.h"
41 #include "core/html/imports/HTMLImportLoader.h" 41 #include "core/html/imports/HTMLImportLoader.h"
42 #include "core/html/imports/HTMLImportTreeRoot.h" 42 #include "core/html/imports/HTMLImportTreeRoot.h"
43 #include "core/html/imports/HTMLImportsController.h" 43 #include "core/html/imports/HTMLImportsController.h"
44 44
45 namespace blink { 45 namespace blink {
46 46
47 HTMLImportChild::HTMLImportChild(const KURL& url, HTMLImportLoader* loader, Sync Mode sync) 47 HTMLImportChild::HTMLImportChild(const KURL& url, HTMLImportLoader* loader, Sync Mode sync)
48 : HTMLImport(sync) 48 : HTMLImport(sync)
(...skipping 29 matching lines...) Expand all
78 { 78 {
79 if (m_client) 79 if (m_client)
80 m_client->didFinish(); 80 m_client->didFinish();
81 } 81 }
82 82
83 void HTMLImportChild::didFinishLoading() 83 void HTMLImportChild::didFinishLoading()
84 { 84 {
85 stateWillChange(); 85 stateWillChange();
86 if (document() && document()->styleSheets()->length() > 0) 86 if (document() && document()->styleSheets()->length() > 0)
87 UseCounter::count(root()->document(), UseCounter::HTMLImportsHasStyleShe ets); 87 UseCounter::count(root()->document(), UseCounter::HTMLImportsHasStyleShe ets);
88 CustomElement::didFinishLoadingImport(*(root()->document())); 88 V0CustomElement::didFinishLoadingImport(*(root()->document()));
89 } 89 }
90 90
91 void HTMLImportChild::didFinishUpgradingCustomElements() 91 void HTMLImportChild::didFinishUpgradingCustomElements()
92 { 92 {
93 stateWillChange(); 93 stateWillChange();
94 m_customElementMicrotaskStep.clear(); 94 m_customElementMicrotaskStep.clear();
95 } 95 }
96 96
97 void HTMLImportChild::dispose() 97 void HTMLImportChild::dispose()
98 { 98 {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 return; 135 return;
136 m_customElementMicrotaskStep->invalidate(); 136 m_customElementMicrotaskStep->invalidate();
137 m_customElementMicrotaskStep.clear(); 137 m_customElementMicrotaskStep.clear();
138 } 138 }
139 139
140 void HTMLImportChild::createCustomElementMicrotaskStepIfNeeded() 140 void HTMLImportChild::createCustomElementMicrotaskStepIfNeeded()
141 { 141 {
142 ASSERT(!m_customElementMicrotaskStep); 142 ASSERT(!m_customElementMicrotaskStep);
143 143
144 if (!hasFinishedLoading() && !formsCycle()) { 144 if (!hasFinishedLoading() && !formsCycle()) {
145 m_customElementMicrotaskStep = CustomElement::didCreateImport(this); 145 m_customElementMicrotaskStep = V0CustomElement::didCreateImport(this);
146 } 146 }
147 } 147 }
148 148
149 bool HTMLImportChild::hasFinishedLoading() const 149 bool HTMLImportChild::hasFinishedLoading() const
150 { 150 {
151 ASSERT(m_loader); 151 ASSERT(m_loader);
152 152
153 return m_loader->isDone() && m_loader->microtaskQueue()->isEmpty() && !m_cus tomElementMicrotaskStep; 153 return m_loader->isDone() && m_loader->microtaskQueue()->isEmpty() && !m_cus tomElementMicrotaskStep;
154 } 154 }
155 155
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 DEFINE_TRACE(HTMLImportChild) 209 DEFINE_TRACE(HTMLImportChild)
210 { 210 {
211 visitor->trace(m_customElementMicrotaskStep); 211 visitor->trace(m_customElementMicrotaskStep);
212 visitor->trace(m_loader); 212 visitor->trace(m_loader);
213 visitor->trace(m_client); 213 visitor->trace(m_client);
214 HTMLImport::trace(visitor); 214 HTMLImport::trace(visitor);
215 } 215 }
216 216
217 } // namespace blink 217 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698