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

Side by Side Diff: Source/core/html/imports/HTMLImportsController.cpp

Issue 202813002: [HTML Import] Let script block by pending resources created by lifecycle callback (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Re-landing with another fix Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/parser/HTMLScriptRunner.h » ('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) 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 clear(); 144 clear();
145 } 145 }
146 146
147 bool HTMLImportsController::hasLoader() const 147 bool HTMLImportsController::hasLoader() const
148 { 148 {
149 return true; 149 return true;
150 } 150 }
151 151
152 bool HTMLImportsController::isDone() const 152 bool HTMLImportsController::isDone() const
153 { 153 {
154 return !m_master->parsing(); 154 return !m_master->parsing() && m_master->haveStylesheetsLoaded();
155 } 155 }
156 156
157 void HTMLImportsController::stateDidChange() 157 void HTMLImportsController::stateDidChange()
158 { 158 {
159 HTMLImport::stateDidChange(); 159 HTMLImport::stateDidChange();
160 160
161 if (!state().isReady()) 161 if (!state().isReady())
162 return; 162 return;
163 if (LocalFrame* frame = m_master->frame()) 163 if (LocalFrame* frame = m_master->frame())
164 frame->loader().checkCompleted(); 164 frame->loader().checkCompleted();
165 } 165 }
166 166
167 void HTMLImportsController::scheduleRecalcState() 167 void HTMLImportsController::scheduleRecalcState()
168 { 168 {
169 if (m_recalcTimer.isActive()) 169 if (m_recalcTimer.isActive())
170 return; 170 return;
171 m_recalcTimer.startOneShot(0, FROM_HERE); 171 m_recalcTimer.startOneShot(0, FROM_HERE);
172 } 172 }
173 173
174 void HTMLImportsController::recalcTimerFired(Timer<HTMLImportsController>*) 174 void HTMLImportsController::recalcTimerFired(Timer<HTMLImportsController>*)
175 { 175 {
176 do { 176 do {
177 m_recalcTimer.stop(); 177 m_recalcTimer.stop();
178 HTMLImport::recalcTreeState(this); 178 HTMLImport::recalcTreeState(this);
179 } while (m_recalcTimer.isActive()); 179 } while (m_recalcTimer.isActive());
180 } 180 }
181 181
182 } // namespace WebCore 182 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/parser/HTMLScriptRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698